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..d3852c64a94de6ca21dcca199e5b34f42d45e720 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,8 @@ 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_; |
| + return !display_list_ || display_list_->IsSuitableForGpuRasterization(); |
|
danakj
2015/09/17 21:11:32
when/how can display_list_ be null?
pdr.
2015/09/18 22:40:14
display_list_ can be null if this is called before
danakj
2015/09/18 22:42:07
I guess I'm wondering, we ask if it's suitable for
|
| } |
| scoped_refptr<RasterSource> DisplayListRecordingSource::CreateRasterSource( |