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

Unified Diff: cc/blink/web_content_layer_impl.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « cc/blink/web_content_layer_impl.h ('k') | cc/blink/web_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_content_layer_impl.cc
diff --git a/cc/blink/web_content_layer_impl.cc b/cc/blink/web_content_layer_impl.cc
index abe3eb30d2098f3a17891843374eb33bf222fe88..922422308d80bbbdad80d218e6d3d10342aa6dfc 100644
--- a/cc/blink/web_content_layer_impl.cc
+++ b/cc/blink/web_content_layer_impl.cc
@@ -19,6 +19,21 @@ using cc::PictureLayer;
namespace cc_blink {
+static blink::WebContentLayerClient::PaintingControlSetting
+PaintingControlToWeb(
+ cc::ContentLayerClient::PaintingControlSetting painting_control) {
+ switch (painting_control) {
+ case cc::ContentLayerClient::PAINTING_BEHAVIOR_NORMAL:
+ return blink::WebContentLayerClient::PaintDefaultBehavior;
+ case cc::ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED:
+ return blink::WebContentLayerClient::DisplayListConstructionDisabled;
+ case cc::ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED:
+ return blink::WebContentLayerClient::DisplayListCachingDisabled;
+ }
+ NOTREACHED();
+ return blink::WebContentLayerClient::PaintDefaultBehavior;
+}
+
WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client)
: client_(client) {
if (WebLayerImpl::UsingPictureLayer())
@@ -50,30 +65,22 @@ void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) {
void WebContentLayerImpl::PaintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
- ContentLayerClient::GraphicsContextStatus graphics_context_status) {
+ cc::ContentLayerClient::PaintingControlSetting painting_control) {
if (!client_)
return;
- client_->paintContents(
- canvas, clip,
- graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
- ? blink::WebContentLayerClient::GraphicsContextEnabled
- : blink::WebContentLayerClient::GraphicsContextDisabled);
+ client_->paintContents(canvas, clip, PaintingControlToWeb(painting_control));
}
scoped_refptr<cc::DisplayItemList>
WebContentLayerImpl::PaintContentsToDisplayList(
const gfx::Rect& clip,
- ContentLayerClient::GraphicsContextStatus graphics_context_status) {
+ cc::ContentLayerClient::PaintingControlSetting painting_control) {
if (!client_)
return cc::DisplayItemList::Create();
WebDisplayItemListImpl list;
- client_->paintContents(
- &list, clip,
- graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
- ? blink::WebContentLayerClient::GraphicsContextEnabled
- : blink::WebContentLayerClient::GraphicsContextDisabled);
+ client_->paintContents(&list, clip, PaintingControlToWeb(painting_control));
return list.ToDisplayItemList();
}
« no previous file with comments | « cc/blink/web_content_layer_impl.h ('k') | cc/blink/web_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698