Chromium Code Reviews| Index: cc/playback/display_list_recording_source.cc |
| diff --git a/cc/playback/display_list_recording_source.cc b/cc/playback/display_list_recording_source.cc |
| index 1ed5a1ff9adb1b2cc75f1ef0b09ecd2111f9a995..c6870f729937fec3cb5ac6ebe93613c31c446ab9 100644 |
| --- a/cc/playback/display_list_recording_source.cc |
| +++ b/cc/playback/display_list_recording_source.cc |
| @@ -52,8 +52,7 @@ DisplayListRecordingSource::DisplayListRecordingSource( |
| background_color_(SK_ColorTRANSPARENT), |
| pixel_record_distance_(kPixelDistanceToRecord), |
| grid_cell_size_(grid_cell_size), |
| - painter_reported_memory_usage_(0), |
| - is_suitable_for_gpu_rasterization_(true) {} |
| + painter_reported_memory_usage_(0) {} |
| DisplayListRecordingSource::~DisplayListRecordingSource() { |
| } |
| @@ -183,8 +182,6 @@ bool DisplayListRecordingSource::UpdateAndExpandInvalidation( |
| painter->PaintContentsToDisplayList(recorded_viewport_, painting_control); |
| painter_reported_memory_usage_ = painter->GetApproximateUnsharedMemoryUsage(); |
| - is_suitable_for_gpu_rasterization_ = |
| - display_list_->IsSuitableForGpuRasterization(); |
| DetermineIfSolidColor(); |
| display_list_->EmitTraceSnapshot(); |
| if (gather_images_) |
| @@ -219,12 +216,11 @@ void DisplayListRecordingSource::SetRequiresClear(bool requires_clear) { |
| requires_clear_ = requires_clear; |
| } |
| -void DisplayListRecordingSource::SetUnsuitableForGpuRasterizationForTesting() { |
| - is_suitable_for_gpu_rasterization_ = false; |
| -} |
| - |
| bool DisplayListRecordingSource::IsSuitableForGpuRasterization() const { |
| - return is_suitable_for_gpu_rasterization_; |
| + // The display list needs to be created (see: UpdateAndExpandInvalidation) |
| + // before checking for suitability. |
| + DCHECK(display_list_.get()); |
|
danakj
2015/09/21 17:47:34
nit: no .get() is needed
pdr.
2015/09/21 18:13:41
Fixed, and updated where I copied this from so fut
|
| + return display_list_->IsSuitableForGpuRasterization(); |
| } |
| scoped_refptr<RasterSource> DisplayListRecordingSource::CreateRasterSource( |