| Index: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| index 1cef1ac82054c64522dbc3563e3a1868df015d50..d29e5394858b786b029383edee7b2c5bc22a71ef 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| @@ -528,6 +528,9 @@ void Canvas2DLayerBridge::Hibernate() {
|
| #if USE_IOSURFACE_FOR_2D_CANVAS
|
| ClearCHROMIUMImageCache();
|
| #endif // USE_IOSURFACE_FOR_2D_CANVAS
|
| + // shouldBeDirectComposited() may have changed.
|
| + if (image_buffer_)
|
| + image_buffer_->SetNeedsCompositingUpdate();
|
| logger_->DidStartHibernating();
|
| }
|
|
|
| @@ -607,11 +610,15 @@ SkSurface* Canvas2DLayerBridge::GetOrCreateSurface(AccelerationHint hint) {
|
| ©_paint);
|
| hibernation_image_.reset();
|
|
|
| - if (image_buffer_)
|
| + if (image_buffer_) {
|
| image_buffer_->UpdateGPUMemoryUsage();
|
|
|
| - if (image_buffer_ && !is_deferral_enabled_)
|
| - image_buffer_->ResetCanvas(surface_paint_canvas_.get());
|
| + if (!is_deferral_enabled_)
|
| + image_buffer_->ResetCanvas(surface_paint_canvas_.get());
|
| +
|
| + // shouldBeDirectComposited() may have changed.
|
| + image_buffer_->SetNeedsCompositingUpdate();
|
| + }
|
| }
|
|
|
| return surface_.get();
|
|
|