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

Unified Diff: Source/platform/graphics/ContentLayerDelegate.cpp

Issue 880653004: Blink side of changes to enable cache clearing without a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Better use of enum. Created 5 years, 11 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/graphics/ContentLayerDelegate.h ('k') | Source/web/LinkHighlight.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ContentLayerDelegate.cpp
diff --git a/Source/platform/graphics/ContentLayerDelegate.cpp b/Source/platform/graphics/ContentLayerDelegate.cpp
index 1e63650c8de1ec49a293119d8e3f3aa4e7f1a3ab..d62c919ca26f872d931679ca764b868ae2b8f41b 100644
--- a/Source/platform/graphics/ContentLayerDelegate.cpp
+++ b/Source/platform/graphics/ContentLayerDelegate.cpp
@@ -53,13 +53,14 @@ ContentLayerDelegate::~ContentLayerDelegate()
void ContentLayerDelegate::paintContents(
SkCanvas* canvas, const WebRect& clip,
- WebContentLayerClient::GraphicsContextStatus contextStatus)
+ WebContentLayerClient::PaintingControlSetting paintingControl)
{
static const unsigned char* annotationsEnabled = 0;
if (UNLIKELY(!annotationsEnabled))
annotationsEnabled = EventTracer::getTraceCategoryEnabledFlag(TRACE_DISABLED_BY_DEFAULT("blink.graphics_context_annotations"));
- GraphicsContext context(canvas, m_painter->displayItemList(), contextStatus == WebContentLayerClient::GraphicsContextEnabled ? GraphicsContext::NothingDisabled : GraphicsContext::FullyDisabled);
+ GraphicsContext context(canvas, m_painter->displayItemList(),
+ paintingControl == WebContentLayerClient::DisplayListConstructionDisabled ? GraphicsContext::FullyDisabled : GraphicsContext::NothingDisabled);
context.setCertainlyOpaque(m_opaque);
if (*annotationsEnabled)
context.setAnnotationMode(AnnotateAll);
@@ -72,12 +73,15 @@ void ContentLayerDelegate::paintContents(
void ContentLayerDelegate::paintContents(
WebDisplayItemList* webDisplayItemList, const WebRect& clip,
- WebContentLayerClient::GraphicsContextStatus contextStatus)
+ WebContentLayerClient::PaintingControlSetting paintingControl)
{
// Once Slimming Paint is fully implemented, this method will no longer
// be needed since Blink will be in charge of creating the display list
// during the document lifecylcle.
+ if (paintingControl == WebContentLayerClient::DisplayListCachingDisabled)
+ m_painter->displayItemList()->invalidateAll();
+
// Some layers don't yet produce display lists. To handle such layers, we
// create a canvas backed by an SkPicture, and manually insert this
// SkPicture into the WebDisplayItemList when the layer's display list is
@@ -88,7 +92,7 @@ void ContentLayerDelegate::paintContents(
canvas->save();
canvas->translate(-clip.x, -clip.y);
canvas->clipRect(SkRect::MakeXYWH(clip.x, clip.y, clip.width, clip.height));
- paintContents(canvas, clip, contextStatus);
+ paintContents(canvas, clip, paintingControl);
canvas->restore();
picture = adoptRef(recorder.endRecording());
« no previous file with comments | « Source/platform/graphics/ContentLayerDelegate.h ('k') | Source/web/LinkHighlight.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698