Chromium Code Reviews| Index: Source/platform/graphics/ContentLayerDelegate.cpp |
| diff --git a/Source/platform/graphics/ContentLayerDelegate.cpp b/Source/platform/graphics/ContentLayerDelegate.cpp |
| index 1e63650c8de1ec49a293119d8e3f3aa4e7f1a3ab..c972f169aada57f927126e7f909f85589f766818 100644 |
| --- a/Source/platform/graphics/ContentLayerDelegate.cpp |
| +++ b/Source/platform/graphics/ContentLayerDelegate.cpp |
| @@ -53,13 +53,13 @@ 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::PaintDefaultBehavior ? GraphicsContext::NothingDisabled : GraphicsContext::FullyDisabled); |
|
chrishtr
2015/02/03 22:05:43
Don't you want to set FullyDisabled only with Disp
Stephen Chennney
2015/02/03 22:11:32
Yes, that makes more sense. We can then get 3 mode
|
| context.setCertainlyOpaque(m_opaque); |
| if (*annotationsEnabled) |
| context.setAnnotationMode(AnnotateAll); |
| @@ -72,12 +72,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 +91,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()); |