Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "cc/base/histograms.h" | 9 #include "cc/base/histograms.h" |
| 10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 } | 212 } |
| 213 | 213 |
| 214 void DisplayListRecordingSource::SetBackgroundColor(SkColor background_color) { | 214 void DisplayListRecordingSource::SetBackgroundColor(SkColor background_color) { |
| 215 background_color_ = background_color; | 215 background_color_ = background_color; |
| 216 } | 216 } |
| 217 | 217 |
| 218 void DisplayListRecordingSource::SetRequiresClear(bool requires_clear) { | 218 void DisplayListRecordingSource::SetRequiresClear(bool requires_clear) { |
| 219 requires_clear_ = requires_clear; | 219 requires_clear_ = requires_clear; |
| 220 } | 220 } |
| 221 | 221 |
| 222 void DisplayListRecordingSource::SetUnsuitableForGpuRasterizationForTesting() { | |
| 223 is_suitable_for_gpu_rasterization_ = false; | |
| 224 } | |
| 225 | |
| 226 bool DisplayListRecordingSource::IsSuitableForGpuRasterization() const { | 222 bool DisplayListRecordingSource::IsSuitableForGpuRasterization() const { |
| 227 return is_suitable_for_gpu_rasterization_; | 223 return is_suitable_for_gpu_rasterization_; |
|
danakj
2015/09/16 23:04:49
do we need this bool anymore, or should we just as
pdr.
2015/09/17 20:52:45
We don't need it, but we need to cache the value s
| |
| 228 } | 224 } |
| 229 | 225 |
| 230 scoped_refptr<RasterSource> DisplayListRecordingSource::CreateRasterSource( | 226 scoped_refptr<RasterSource> DisplayListRecordingSource::CreateRasterSource( |
| 231 bool can_use_lcd_text) const { | 227 bool can_use_lcd_text) const { |
| 232 return scoped_refptr<RasterSource>( | 228 return scoped_refptr<RasterSource>( |
| 233 DisplayListRasterSource::CreateFromDisplayListRecordingSource( | 229 DisplayListRasterSource::CreateFromDisplayListRecordingSource( |
| 234 this, can_use_lcd_text)); | 230 this, can_use_lcd_text)); |
| 235 } | 231 } |
| 236 | 232 |
| 237 void DisplayListRecordingSource::DetermineIfSolidColor() { | 233 void DisplayListRecordingSource::DetermineIfSolidColor() { |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 249 } | 245 } |
| 250 | 246 |
| 251 void DisplayListRecordingSource::Clear() { | 247 void DisplayListRecordingSource::Clear() { |
| 252 recorded_viewport_ = gfx::Rect(); | 248 recorded_viewport_ = gfx::Rect(); |
| 253 display_list_ = NULL; | 249 display_list_ = NULL; |
| 254 painter_reported_memory_usage_ = 0; | 250 painter_reported_memory_usage_ = 0; |
| 255 is_solid_color_ = false; | 251 is_solid_color_ = false; |
| 256 } | 252 } |
| 257 | 253 |
| 258 } // namespace cc | 254 } // namespace cc |
| OLD | NEW |