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

Unified Diff: Source/web/PageOverlayTest.cpp

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 5 months 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
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeOverlay.cpp ('k') | Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageOverlayTest.cpp
diff --git a/Source/web/PageOverlayTest.cpp b/Source/web/PageOverlayTest.cpp
index afbe4049ad8fc521358cc6785640f4ba6777596a..9e738b47bfee30039f488bd34f85c787a3d478aa 100644
--- a/Source/web/PageOverlayTest.cpp
+++ b/Source/web/PageOverlayTest.cpp
@@ -105,10 +105,11 @@ public:
void paintPageOverlay(WebGraphicsContext* context, const WebSize& size) override
{
GraphicsContext& graphicsContext = toWebGraphicsContextImpl(context)->graphicsContext();
+ if (DrawingRecorder::useCachedDrawingIfPossible(graphicsContext, *this, DisplayItem::PageOverlay))
+ return;
FloatRect rect(0, 0, size.width, size.height);
DrawingRecorder drawingRecorder(graphicsContext, *this, DisplayItem::PageOverlay, rect);
- if (!drawingRecorder.canUseCachedDrawing())
- graphicsContext.fillRect(rect, m_color);
+ graphicsContext.fillRect(rect, m_color);
}
DisplayItemClient displayItemClient() const { return toDisplayItemClient(this); }
« no previous file with comments | « Source/platform/scroll/ScrollbarThemeOverlay.cpp ('k') | Source/web/PageWidgetDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698