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

Unified Diff: cc/resources/picture_pile_impl.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_pile_impl.h ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile_impl.cc
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index d629888b871e855fb6a98fa4ad7e7a5fb13b586f..a9bad90a9240c6f15f712a1d078837fab8563ba7 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -19,14 +19,15 @@
namespace cc {
scoped_refptr<PicturePileImpl> PicturePileImpl::CreateFromPicturePile(
- const PicturePile* other) {
- return make_scoped_refptr(new PicturePileImpl(other));
+ const PicturePile* other,
+ bool can_use_lcd_text) {
+ return make_scoped_refptr(new PicturePileImpl(other, can_use_lcd_text));
}
PicturePileImpl::PicturePileImpl()
: background_color_(SK_ColorTRANSPARENT),
requires_clear_(true),
- can_use_lcd_text_(false),
+ can_use_lcd_text_(true),
is_solid_color_(false),
solid_color_(SK_ColorTRANSPARENT),
has_any_recordings_(false),
@@ -36,12 +37,13 @@ PicturePileImpl::PicturePileImpl()
should_attempt_to_use_distance_field_text_(false) {
}
-PicturePileImpl::PicturePileImpl(const PicturePile* other)
+PicturePileImpl::PicturePileImpl(const PicturePile* other,
+ bool can_use_lcd_text)
: picture_map_(other->picture_map_),
tiling_(other->tiling_),
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_),
@@ -53,6 +55,25 @@ PicturePileImpl::PicturePileImpl(const PicturePile* other)
should_attempt_to_use_distance_field_text_(false) {
}
+PicturePileImpl::PicturePileImpl(const PicturePileImpl* other,
+ bool can_use_lcd_text)
+ : picture_map_(other->picture_map_),
+ tiling_(other->tiling_),
+ 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_),
+ has_any_recordings_(other->has_any_recordings_),
+ clear_canvas_with_debug_color_(other->clear_canvas_with_debug_color_),
+ min_contents_scale_(other->min_contents_scale_),
+ 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_) {
+}
+
PicturePileImpl::~PicturePileImpl() {
}
@@ -383,6 +404,13 @@ bool PicturePileImpl::CanUseLCDText() const {
return can_use_lcd_text_;
}
+scoped_refptr<RasterSource> PicturePileImpl::CreateCloneWithoutLCDText() const {
+ DCHECK(CanUseLCDText());
+ bool can_use_lcd_text = false;
+ return scoped_refptr<RasterSource>(
+ new PicturePileImpl(this, can_use_lcd_text));
+}
+
PicturePileImpl::PixelRefIterator::PixelRefIterator(
const gfx::Rect& content_rect,
float contents_scale,
« no previous file with comments | « cc/resources/picture_pile_impl.h ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698