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

Unified Diff: cc/resources/display_list_recording_source.cc

Issue 900043002: Modify rasterize_and_record for DisplayItemList recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
Index: cc/resources/display_list_recording_source.cc
diff --git a/cc/resources/display_list_recording_source.cc b/cc/resources/display_list_recording_source.cc
index 7b98e50ddf0a3cba056a8fc89bade7439999868b..9ab70a4e39e0f412c8df3abe7324b895bc2efe0b 100644
--- a/cc/resources/display_list_recording_source.cc
+++ b/cc/resources/display_list_recording_source.cc
@@ -45,7 +45,7 @@ bool DisplayListRecordingSource::UpdateAndExpandInvalidation(
const gfx::Size& layer_size,
const gfx::Rect& visible_layer_rect,
int frame_number,
- Picture::RecordingMode recording_mode) {
+ RecordingMode recording_mode) {
bool updated = false;
if (size_ != layer_size) {
@@ -81,12 +81,32 @@ bool DisplayListRecordingSource::UpdateAndExpandInvalidation(
if (!updated && !invalidation->Intersects(recorded_viewport_))
return false;
- // TODO(ajuma): Does repeating this way really makes sense with display lists?
+ ContentLayerClient::PaintingControlSetting painting_control =
+ ContentLayerClient::PAINTING_BEHAVIOR_NORMAL;
+
+ switch (recording_mode) {
+ case RECORD_NORMALLY:
+ // Already setup for normal recording.
+ break;
+ case RECORD_WITH_SK_NULL_CANVAS:
+ // TODO(schenney): Remove this when DisplayList recording is the only
+ // option. For now, fall through and disable construction.
+ case RECORD_WITH_PAINTING_DISABLED:
+ painting_control = ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED;
+ break;
+ case RECORD_WITH_CACHING_DISABLED:
+ painting_control = ContentLayerClient::DISPLAY_LIST_CACHING_DISABLED;
+ break;
+ default:
+ NOTREACHED();
+ }
+
+ // TODO(ajuma): Does repeating this way really make sense with display lists?
// With Blink caching recordings, repeated calls will not cause re-recording.
ajuma 2015/02/04 22:47:33 This TODO can be removed now that we're choosing w
Stephen Chennney 2015/02/05 14:57:42 I reworked the logic to force non-caching if the r
int repeat_count = std::max(1, slow_down_raster_scale_factor_for_debug_);
for (int i = 0; i < repeat_count; ++i) {
- display_list_ = painter->PaintContentsToDisplayList(
- recorded_viewport_, ContentLayerClient::GRAPHICS_CONTEXT_ENABLED);
+ display_list_ = painter->PaintContentsToDisplayList(recorded_viewport_,
+ painting_control);
}
display_list_->set_layer_rect(recorded_viewport_);
is_suitable_for_gpu_rasterization_ =

Powered by Google App Engine
This is Rietveld 408576698