Index: cc/resources/display_list_raster_source.cc |
diff --git a/cc/resources/display_list_raster_source.cc b/cc/resources/display_list_raster_source.cc |
index 4479a166c3b4942e15f5247b581d01646d5f7bd9..ab0292e8537aabc401e84da6ac8596c686a65a78 100644 |
--- a/cc/resources/display_list_raster_source.cc |
+++ b/cc/resources/display_list_raster_source.cc |
@@ -26,14 +26,12 @@ const bool kDefaultClearCanvasSetting = true; |
namespace cc { |
-scoped_refptr<DisplayListRasterSource> DisplayListRasterSource::Create() { |
- return make_scoped_refptr(new DisplayListRasterSource); |
-} |
- |
scoped_refptr<DisplayListRasterSource> |
DisplayListRasterSource::CreateFromDisplayListRecordingSource( |
- const DisplayListRecordingSource* other) { |
- return make_scoped_refptr(new DisplayListRasterSource(other)); |
+ const DisplayListRecordingSource* other, |
+ bool can_use_lcd_text) { |
+ return make_scoped_refptr( |
+ new DisplayListRasterSource(other, can_use_lcd_text)); |
} |
DisplayListRasterSource::DisplayListRasterSource() |
@@ -48,11 +46,12 @@ DisplayListRasterSource::DisplayListRasterSource() |
} |
DisplayListRasterSource::DisplayListRasterSource( |
- const DisplayListRecordingSource* other) |
+ const DisplayListRecordingSource* other, |
+ bool can_use_lcd_text) |
: display_list_(other->display_list_), |
background_color_(other->background_color_), |
requires_clear_(other->requires_clear_), |
- can_use_lcd_text_(other->can_use_lcd_text_), |
+ can_use_lcd_text_(can_use_lcd_text), |
is_solid_color_(other->is_solid_color_), |
solid_color_(other->solid_color_), |
recorded_viewport_(other->recorded_viewport_), |
@@ -63,6 +62,24 @@ DisplayListRasterSource::DisplayListRasterSource( |
should_attempt_to_use_distance_field_text_(false) { |
} |
+DisplayListRasterSource::DisplayListRasterSource( |
+ const DisplayListRasterSource* other, |
+ bool can_use_lcd_text) |
+ : display_list_(other->display_list_), |
+ background_color_(other->background_color_), |
+ requires_clear_(other->requires_clear_), |
+ can_use_lcd_text_(can_use_lcd_text), |
+ is_solid_color_(other->is_solid_color_), |
+ solid_color_(other->solid_color_), |
+ recorded_viewport_(other->recorded_viewport_), |
+ size_(other->size_), |
+ clear_canvas_with_debug_color_(kDefaultClearCanvasSetting), |
+ slow_down_raster_scale_factor_for_debug_( |
+ other->slow_down_raster_scale_factor_for_debug_), |
+ should_attempt_to_use_distance_field_text_( |
+ other->should_attempt_to_use_distance_field_text_) { |
+} |
+ |
DisplayListRasterSource::~DisplayListRasterSource() { |
} |
@@ -197,4 +214,11 @@ bool DisplayListRasterSource::CanUseLCDText() const { |
return can_use_lcd_text_; |
} |
+scoped_refptr<RasterSource> DisplayListRasterSource::CreateCloneWithoutLCDText() |
+ const { |
+ bool can_use_lcd_text = false; |
+ return scoped_refptr<RasterSource>( |
+ new DisplayListRasterSource(this, can_use_lcd_text)); |
+} |
+ |
} // namespace cc |