Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 1482363004: Fixing laggy chrome on a multitude of accelerated canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m_imageBuffer nullibility check to ensure other unrelated unit tests on layerbridge not fail Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b9ce0de3eb97660edfe0a1fa28f7173b660339cf..3f16b1f996f41bf9fa54050e0a78f9de1c3e0fd3 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -195,6 +195,9 @@ SkSurface* Canvas2DLayerBridge::getOrCreateSurface(AccelerationHint hint)
GraphicsLayer::registerContentsLayer(m_layer->layer());
m_layer->setNearestNeighbor(m_filterQuality == kNone_SkFilterQuality);
}
+
+ if (m_imageBuffer)
+ m_imageBuffer->updateGPUMemoryUsage();
}
return m_surface.get();
}
@@ -406,6 +409,8 @@ bool Canvas2DLayerBridge::restoreSurface()
// FIXME: draw sad canvas picture into new buffer crbug.com/243842
}
}
+ if (m_imageBuffer)
+ m_imageBuffer->updateGPUMemoryUsage();
return m_surface;
}

Powered by Google App Engine
This is Rietveld 408576698