Bug 1016540 - GrallocTextureSource::DeallocateDeviceData must assert that it has a compositor, rather than a gl context. r=sotaro
authorNicolas Silva <nsilva@mozilla.com>
Tue, 07 Oct 2014 10:45:04 +0200
changeset 232344 c890e0fa846d02d879547df458a9d6c25e540cbc
parent 232343 344c06f4460b1f03a76f79c832c5e3677b6e0fa8
child 232345 8d52ce400c01ec33ffa9d2682f3e9dec8e36537f
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1016540
milestone35.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 1016540 - GrallocTextureSource::DeallocateDeviceData must assert that it has a compositor, rather than a gl context. r=sotaro
gfx/layers/RotatedBuffer.cpp
gfx/layers/opengl/GrallocTextureHost.cpp
--- a/gfx/layers/RotatedBuffer.cpp
+++ b/gfx/layers/RotatedBuffer.cpp
@@ -722,21 +722,21 @@ RotatedContentBuffer::BorrowDrawTargetFo
     drawPtr = &aIter->mDrawRegion;
   }
   if (result->GetBackendType() == BackendType::DIRECT2D ||
       result->GetBackendType() == BackendType::DIRECT2D1_1) {
     drawPtr->SimplifyOutwardByArea(100 * 100);
   }
 
   if (aPaintState.mMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) {
-    MOZ_ASSERT(mDTBuffer && mDTBufferOnWhite);
     if (!mDTBuffer || !mDTBufferOnWhite) {
       // This can happen in release builds if allocating one of the two buffers
       // failed. This is pretty bad and the reason for the failure is already
       // reported through gfxCriticalError.
+      MOZ_ASSERT(false);
       return nullptr;
     }
     nsIntRegionRectIterator iter(*drawPtr);
     const nsIntRect *iterRect;
     while ((iterRect = iter.Next())) {
       mDTBuffer->FillRect(Rect(iterRect->x, iterRect->y, iterRect->width, iterRect->height),
                           ColorPattern(Color(0.0, 0.0, 0.0, 1.0)));
       mDTBufferOnWhite->FillRect(Rect(iterRect->x, iterRect->y, iterRect->width, iterRect->height),
--- a/gfx/layers/opengl/GrallocTextureHost.cpp
+++ b/gfx/layers/opengl/GrallocTextureHost.cpp
@@ -290,17 +290,17 @@ GrallocTextureSourceOGL::GetSize() const
   }
   return gfx::IntSize(mGraphicBuffer->getWidth(), mGraphicBuffer->getHeight());
 }
 
 void
 GrallocTextureSourceOGL::DeallocateDeviceData()
 {
   if (mEGLImage) {
-    MOZ_ASSERT(gl());
+    MOZ_ASSERT(mCompositor);
     if (!gl() || !gl()->MakeCurrent()) {
       return;
     }
     if (mTextureBackendSpecificData) {
       mTextureBackendSpecificData->ClearBoundEGLImage(mEGLImage);
     }
     EGLImageDestroy(gl(), mEGLImage);
     mEGLImage = EGL_NO_IMAGE;