Bug 1519758: Do not instruct the texture client to clear textures upon allocation on the main thread. r=rhunt
authorBas Schouten <bschouten@mozilla.com>
Mon, 14 Jan 2019 05:04:14 +0100
changeset 454515 a7238b0eac40faf3472969790f8b7849ad2677c5
parent 454413 9ac2f47b3cc21276f6d8306175a4f428dcd4378f
child 454516 42e89a539b98214d8be40cbc7c7860051599e1b6
push id35400
push usercsabou@mozilla.com
push dateSat, 19 Jan 2019 09:59:33 +0000
treeherdermozilla-central@f90bab5af97e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhunt
bugs1519758
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1519758: Do not instruct the texture client to clear textures upon allocation on the main thread. r=rhunt Differential Revision: https://phabricator.services.mozilla.com/D16431
gfx/layers/client/ContentClient.cpp
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -636,32 +636,30 @@ RefPtr<RotatedBuffer> ContentClientRemot
 
   return buffer;
 }
 
 RefPtr<RotatedBuffer> ContentClientRemoteBuffer::CreateBufferInternal(
     const gfx::IntRect& aRect, gfx::SurfaceFormat aFormat,
     TextureFlags aFlags) {
   TextureAllocationFlags textureAllocFlags =
-      (aFlags & TextureFlags::COMPONENT_ALPHA)
-          ? TextureAllocationFlags::ALLOC_CLEAR_BUFFER_BLACK
-          : TextureAllocationFlags::ALLOC_CLEAR_BUFFER;
+      TextureAllocationFlags::ALLOC_DEFAULT;
 
   RefPtr<TextureClient> textureClient = CreateTextureClientForDrawing(
       aFormat, aRect.Size(), BackendSelector::Content,
       aFlags | ExtraTextureFlags() | TextureFlags::BLOCKING_READ_LOCK,
       textureAllocFlags);
 
   if (!textureClient || !AddTextureClient(textureClient)) {
     return nullptr;
   }
 
   RefPtr<TextureClient> textureClientOnWhite;
   if (aFlags & TextureFlags::COMPONENT_ALPHA) {
-    TextureAllocationFlags allocFlags = ALLOC_CLEAR_BUFFER_WHITE;
+    TextureAllocationFlags allocFlags = TextureAllocationFlags::ALLOC_DEFAULT;
     if (mForwarder->SupportsTextureDirectMapping()) {
       allocFlags =
           TextureAllocationFlags(allocFlags | ALLOC_ALLOW_DIRECT_MAPPING);
     }
     textureClientOnWhite =
         textureClient->CreateSimilar(mForwarder->GetCompositorBackendType(),
                                      aFlags | ExtraTextureFlags(), allocFlags);
     if (!textureClientOnWhite || !AddTextureClient(textureClientOnWhite)) {