summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/blink/web_content_layer_impl.cc2
-rw-r--r--cc/debug/rasterize_and_record_benchmark.cc2
-rw-r--r--cc/layers/content_layer_client.h1
-rw-r--r--third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp4
-rw-r--r--third_party/WebKit/public/platform/WebContentLayerClient.h3
5 files changed, 10 insertions, 2 deletions
diff --git a/cc/blink/web_content_layer_impl.cc b/cc/blink/web_content_layer_impl.cc
index 5e4e744..458b398 100644
--- a/cc/blink/web_content_layer_impl.cc
+++ b/cc/blink/web_content_layer_impl.cc
@@ -34,6 +34,8 @@ PaintingControlToWeb(
switch (painting_control) {
case cc::ContentLayerClient::PAINTING_BEHAVIOR_NORMAL:
return blink::WebContentLayerClient::PaintDefaultBehavior;
+ case cc::ContentLayerClient::PAINTING_BEHAVIOR_NORMAL_FOR_TEST:
+ return blink::WebContentLayerClient::PaintDefaultBehaviorForTest;
case cc::ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED:
return blink::WebContentLayerClient::DisplayListConstructionDisabled;
case cc::ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED:
diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc
index 59d1665..3a49ab6 100644
--- a/cc/debug/rasterize_and_record_benchmark.cc
+++ b/cc/debug/rasterize_and_record_benchmark.cc
@@ -125,7 +125,7 @@ void RasterizeAndRecordBenchmark::RunOnLayer(PictureLayer* layer) {
mode_index < DisplayListRecordingSource::RECORDING_MODE_COUNT;
mode_index++) {
ContentLayerClient::PaintingControlSetting painting_control =
- ContentLayerClient::PAINTING_BEHAVIOR_NORMAL;
+ ContentLayerClient::PAINTING_BEHAVIOR_NORMAL_FOR_TEST;
switch (
static_cast<DisplayListRecordingSource::RecordingMode>(mode_index)) {
case DisplayListRecordingSource::RECORD_NORMALLY:
diff --git a/cc/layers/content_layer_client.h b/cc/layers/content_layer_client.h
index db9274f..75329c7 100644
--- a/cc/layers/content_layer_client.h
+++ b/cc/layers/content_layer_client.h
@@ -20,6 +20,7 @@ class CC_EXPORT ContentLayerClient {
public:
enum PaintingControlSetting {
PAINTING_BEHAVIOR_NORMAL,
+ PAINTING_BEHAVIOR_NORMAL_FOR_TEST,
DISPLAY_LIST_CONSTRUCTION_DISABLED,
DISPLAY_LIST_CACHING_DISABLED,
DISPLAY_LIST_PAINTING_DISABLED,
diff --git a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
index 63b2c03..a12c63d 100644
--- a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
@@ -92,8 +92,10 @@ void ContentLayerDelegate::paintContents(
|| paintingControl == WebContentLayerClient::DisplayListConstructionDisabled)
disabledMode = GraphicsContext::FullyDisabled;
- m_graphicsLayer->paint(nullptr, disabledMode);
+ if (paintingControl != PaintDefaultBehavior)
+ m_graphicsLayer->paint(nullptr, disabledMode);
paintArtifactToWebDisplayItemList(webDisplayItemList, paintController.paintArtifact(), paintableRegion());
+
paintController.setDisplayItemConstructionIsDisabled(false);
paintController.setSubsequenceCachingIsDisabled(false);
}
diff --git a/third_party/WebKit/public/platform/WebContentLayerClient.h b/third_party/WebKit/public/platform/WebContentLayerClient.h
index ca0c520..d1071c2 100644
--- a/third_party/WebKit/public/platform/WebContentLayerClient.h
+++ b/third_party/WebKit/public/platform/WebContentLayerClient.h
@@ -40,7 +40,10 @@ class WebDisplayItemList;
class BLINK_PLATFORM_EXPORT WebContentLayerClient {
public:
enum PaintingControlSetting {
+ // Returns the last PaintArtifact produced.
PaintDefaultBehavior,
+ // Paints the content to simulate the behavior of FrameView::synchronizedPaint.
+ PaintDefaultBehaviorForTest,
DisplayListConstructionDisabled,
DisplayListCachingDisabled,
DisplayListPaintingDisabled,