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

Side by Side Diff: cc/playback/display_list_recording_source.cc

Issue 1489713004: Remove the clip parameter from ContentLayerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clipremoval
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/test/fake_content_layer_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/playback/display_list_recording_source.h" 5 #include "cc/playback/display_list_recording_source.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/numerics/safe_math.h" 9 #include "base/numerics/safe_math.h"
10 #include "cc/base/histograms.h" 10 #include "cc/base/histograms.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 case RECORD_WITH_CONSTRUCTION_DISABLED: 107 case RECORD_WITH_CONSTRUCTION_DISABLED:
108 painting_control = ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED; 108 painting_control = ContentLayerClient::DISPLAY_LIST_CONSTRUCTION_DISABLED;
109 break; 109 break;
110 case RECORD_WITH_SK_NULL_CANVAS: 110 case RECORD_WITH_SK_NULL_CANVAS:
111 case RECORDING_MODE_COUNT: 111 case RECORDING_MODE_COUNT:
112 NOTREACHED(); 112 NOTREACHED();
113 } 113 }
114 114
115 // TODO(vmpstr): Add a slow_down_recording_scale_factor_for_debug_ to be able 115 // TODO(vmpstr): Add a slow_down_recording_scale_factor_for_debug_ to be able
116 // to slow down recording. 116 // to slow down recording.
117 display_list_ = 117 display_list_ = painter->PaintContentsToDisplayList(painting_control);
118 painter->PaintContentsToDisplayList(recorded_viewport_, painting_control);
119 painter_reported_memory_usage_ = painter->GetApproximateUnsharedMemoryUsage(); 118 painter_reported_memory_usage_ = painter->GetApproximateUnsharedMemoryUsage();
120 119
121 DetermineIfSolidColor(); 120 DetermineIfSolidColor();
122 display_list_->EmitTraceSnapshot(); 121 display_list_->EmitTraceSnapshot();
123 if (generate_discardable_images_metadata_) 122 if (generate_discardable_images_metadata_)
124 display_list_->GenerateDiscardableImagesMetadata(); 123 display_list_->GenerateDiscardableImagesMetadata();
125 124
126 return true; 125 return true;
127 } 126 }
128 127
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 181 }
183 182
184 void DisplayListRecordingSource::Clear() { 183 void DisplayListRecordingSource::Clear() {
185 recorded_viewport_ = gfx::Rect(); 184 recorded_viewport_ = gfx::Rect();
186 display_list_ = nullptr; 185 display_list_ = nullptr;
187 painter_reported_memory_usage_ = 0; 186 painter_reported_memory_usage_ = 0;
188 is_solid_color_ = false; 187 is_solid_color_ = false;
189 } 188 }
190 189
191 } // namespace cc 190 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/test/fake_content_layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698