/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Test the validity of aAllocator constauto& compositableForwarder = GetForwarder(); if (!compositableForwarder) { return nullptr;
} constauto& textureForwarder = compositableForwarder->GetTextureForwarder();
auto format = gfx::SurfaceFormat::R8G8B8X8; if (!mData.mIsOpaque) {
format = gfx::SurfaceFormat::R8G8B8A8;
if (!mData.mIsAlphaPremult) {
flags |= TextureFlags::NON_PREMULTIPLIED;
}
}
// Let's see if we can get a no-copy TextureClient from the canvas. bool lostFrontTexture = false; auto tc = fnGetExistingTc(desc, lostFrontTexture); if (lostFrontTexture) { // Device reset could cause this. return;
} if (!tc) { // Otherwise, snapshot the surface and copy into a TexClient.
tc = fnMakeTcFromSnapshot();
} if (tc != mFrontBufferFromDesc) {
mFrontBufferFromDesc = nullptr;
}
if (!tc) {
NS_WARNING("Couldn't make TextureClient for CanvasRenderer."); return;
}
mCanvasClient->UseTexture(tc);
FireDidTransactionCallback();
}
}
} // namespace layers
} // namespace mozilla
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.