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

Unified Diff: Source/core/paint/LayerClipRecorderTest.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/core/paint/InlineTextBoxPainter.cpp ('k') | Source/core/paint/LayoutObjectDrawingRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/LayerClipRecorderTest.cpp
diff --git a/Source/core/paint/LayerClipRecorderTest.cpp b/Source/core/paint/LayerClipRecorderTest.cpp
index cbe1567b182fdcd3bc0df446011db77ae63d8d12..da75862b9ef012f68d403b01e61ba1370780cfc9 100644
--- a/Source/core/paint/LayerClipRecorderTest.cpp
+++ b/Source/core/paint/LayerClipRecorderTest.cpp
@@ -60,9 +60,10 @@ void drawRectInClip(GraphicsContext& context, LayoutView& layoutView, PaintPhase
IntRect rect(1, 1, 9, 9);
ClipRect clipRect((LayoutRect(rect)));
LayerClipRecorder LayerClipRecorder(context, *layoutView.compositor()->rootLayer()->layoutObject(), DisplayItem::ClipLayerForeground, clipRect, 0, LayoutPoint(), PaintLayerFlags());
- LayoutObjectDrawingRecorder drawingRecorder(context, layoutView, phase, bound);
- if (!drawingRecorder.canUseCachedDrawing())
+ if (!LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutView, phase)) {
+ LayoutObjectDrawingRecorder drawingRecorder(context, layoutView, phase, bound);
context.drawRect(rect);
+ }
}
TEST_F(LayerClipRecorderTest, Single)
« no previous file with comments | « Source/core/paint/InlineTextBoxPainter.cpp ('k') | Source/core/paint/LayoutObjectDrawingRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698