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

Unified Diff: Source/core/rendering/RenderBlockFlow.cpp

Issue 799563002: Use DrawingRecorder::canUseCachedDrawing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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
« no previous file with comments | « Source/core/paint/ViewDisplayListTest.cpp ('k') | Source/platform/graphics/paint/DrawingRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockFlow.cpp
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
index 15d3dca9a0d487f394154c58e308a2f7a3da6050..cd17a26354df7b8a94892a361b230c5cc1f6802b 100644
--- a/Source/core/rendering/RenderBlockFlow.cpp
+++ b/Source/core/rendering/RenderBlockFlow.cpp
@@ -2824,8 +2824,9 @@ LayoutRect RenderBlockFlow::blockSelectionGap(const RenderBlock* rootBlock, cons
LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight));
if (paintInfo) {
IntRect selectionGapRect = alignSelectionRectToDevicePixels(gapRect);
- RenderDrawingRecorder recorder(paintInfo->context, this, paintInfo->phase, selectionGapRect);
- paintInfo->context->fillRect(selectionGapRect, selectionBackgroundColor());
+ RenderDrawingRecorder recorder(paintInfo->context, *this, paintInfo->phase, selectionGapRect);
+ if (!recorder.canUseCachedDrawing())
+ paintInfo->context->fillRect(selectionGapRect, selectionBackgroundColor());
}
return gapRect;
}
@@ -2907,8 +2908,9 @@ LayoutRect RenderBlockFlow::logicalLeftSelectionGap(const RenderBlock* rootBlock
LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight));
if (paintInfo) {
IntRect selectionGapRect = alignSelectionRectToDevicePixels(gapRect);
- RenderDrawingRecorder recorder(paintInfo->context, this, paintInfo->phase, selectionGapRect);
- paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor());
+ RenderDrawingRecorder recorder(paintInfo->context, *this, paintInfo->phase, selectionGapRect);
+ if (!recorder.canUseCachedDrawing())
+ paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor());
}
return gapRect;
}
@@ -2926,8 +2928,9 @@ LayoutRect RenderBlockFlow::logicalRightSelectionGap(const RenderBlock* rootBloc
LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalWidth, logicalHeight));
if (paintInfo) {
IntRect selectionGapRect = alignSelectionRectToDevicePixels(gapRect);
- RenderDrawingRecorder recorder(paintInfo->context, this, paintInfo->phase, selectionGapRect);
- paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor());
+ RenderDrawingRecorder recorder(paintInfo->context, *this, paintInfo->phase, selectionGapRect);
+ if (!recorder.canUseCachedDrawing())
+ paintInfo->context->fillRect(selectionGapRect, selObj->selectionBackgroundColor());
}
return gapRect;
}
« no previous file with comments | « Source/core/paint/ViewDisplayListTest.cpp ('k') | Source/platform/graphics/paint/DrawingRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698