Bug 1298501 - Fix Compositor::IsValid returning the wrong value. r=mattwoodrow
authorDavid Anderson <danderson@mozilla.com>
Fri, 26 Aug 2016 13:38:00 -0400
changeset 312419 8103fef19cbb60df33c0085d2e91d6a83d68ae43
parent 312418 246d2a65316a70192506abcecb78ef1a4e6e0ff5
child 312420 4dfb2d13513f7955a7ee7da6eb37eae0bd5d3df3
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1298501
milestone51.0a1
Bug 1298501 - Fix Compositor::IsValid returning the wrong value. r=mattwoodrow
gfx/layers/Compositor.cpp
gfx/layers/ipc/CompositableTransactionParent.cpp
--- a/gfx/layers/Compositor.cpp
+++ b/gfx/layers/Compositor.cpp
@@ -492,17 +492,17 @@ void
 Compositor::SetInvalid()
 {
   mParent = nullptr;
 }
 
 bool
 Compositor::IsValid() const
 {
-  return !mParent;
+  return !!mParent;
 }
 
 #if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 17
 void
 Compositor::SetDispAcquireFence(Layer* aLayer)
 {
   // OpenGL does not provide ReleaseFence for rendering.
   // Instead use DispAcquireFence as layer buffer's ReleaseFence
--- a/gfx/layers/ipc/CompositableTransactionParent.cpp
+++ b/gfx/layers/ipc/CompositableTransactionParent.cpp
@@ -72,17 +72,17 @@ static bool ValidatePictureRect(const mo
 
 bool
 CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation& aEdit,
                                                      EditReplyVector& replyv)
 {
   // Ignore all operations on compositables created on stale compositors. We
   // return true because the child is unable to handle errors.
   CompositableHost* compositable = CompositableHost::FromIPDLActor(aEdit.compositableParent());
-  if (compositable->GetCompositor() && compositable->GetCompositor()->IsValid()) {
+  if (compositable->GetCompositor() && !compositable->GetCompositor()->IsValid()) {
     return true;
   }
 
   switch (aEdit.detail().type()) {
     case CompositableOperationDetail::TOpPaintTextureRegion: {
       MOZ_LAYERS_LOG(("[ParentSide] Paint PaintedLayer"));
 
       const OpPaintTextureRegion& op = aEdit.detail().get_OpPaintTextureRegion();