Bug 1062475 - [Camera] Camera button highlight appears as a square. r=sotaro
authorchiajung hung <chung@mozilla.com>
Mon, 20 Oct 2014 02:49:00 -0400
changeset 211326 2a87759dd8c8a3eee0eaea861a6d73b1aa36307b
parent 211325 6c5707f6f64bcc2cfa88459f7aa1a0eb242cdde8
child 211327 d986a5a0ebed4c85548a3f461a3538bb815cdac0
push id27673
push userkwierso@gmail.com
push dateTue, 21 Oct 2014 01:57:45 +0000
treeherdermozilla-central@29fbfc1b31aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1062475
milestone36.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 1062475 - [Camera] Camera button highlight appears as a square. r=sotaro
gfx/layers/client/ImageClient.cpp
--- a/gfx/layers/client/ImageClient.cpp
+++ b/gfx/layers/client/ImageClient.cpp
@@ -186,18 +186,19 @@ ImageClientSingle::UpdateImageInternal(I
     return true;
   }
 
   AutoRemoveTexture autoRemoveTexture(this);
 
   if (image->AsSharedImage() && image->AsSharedImage()->GetTextureClient(this)) {
     // fast path: no need to allocate and/or copy image data
     RefPtr<TextureClient> texture = image->AsSharedImage()->GetTextureClient(this);
-
-    autoRemoveTexture.mTexture = mFrontBuffer;
+    if (texture != mFrontBuffer) {
+      autoRemoveTexture.mTexture = mFrontBuffer;
+    }
     mFrontBuffer = texture;
     if (!AddTextureClient(texture)) {
       mFrontBuffer = nullptr;
       return false;
     }
     GetForwarder()->UpdatedTexture(this, texture, nullptr);
     GetForwarder()->UseTexture(this, texture);
   } else if (image->GetFormat() == ImageFormat::PLANAR_YCBCR) {