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

Unified Diff: cc/resources/picture_pile.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.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 7e94e18e44477c536e40ce94a0d0dc3fb0d1f729..2b15aeadb7c9ada7fee2003e0d0c465fd7a91785 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -166,7 +166,6 @@ PicturePile::PicturePile(float min_contents_scale,
const gfx::Size& tile_grid_size)
: min_contents_scale_(0),
slow_down_raster_scale_factor_for_debug_(0),
- can_use_lcd_text_(true),
has_any_recordings_(false),
clear_canvas_with_debug_color_(kDefaultClearCanvasSetting),
requires_clear_(true),
@@ -186,22 +185,17 @@ PicturePile::~PicturePile() {
bool PicturePile::UpdateAndExpandInvalidation(
ContentLayerClient* painter,
Region* invalidation,
- bool can_use_lcd_text,
const gfx::Size& layer_size,
const gfx::Rect& visible_layer_rect,
int frame_number,
RecordingSource::RecordingMode recording_mode) {
- bool can_use_lcd_text_changed = can_use_lcd_text_ != can_use_lcd_text;
- can_use_lcd_text_ = can_use_lcd_text;
-
gfx::Rect interest_rect = visible_layer_rect;
interest_rect.Inset(-pixel_record_distance_, -pixel_record_distance_);
recorded_viewport_ = interest_rect;
recorded_viewport_.Intersect(gfx::Rect(layer_size));
- bool updated =
- ApplyInvalidationAndResize(interest_rect, invalidation, layer_size,
- frame_number, can_use_lcd_text_changed);
+ bool updated = ApplyInvalidationAndResize(interest_rect, invalidation,
+ layer_size, frame_number);
std::vector<gfx::Rect> invalid_tiles;
GetInvalidTileRects(interest_rect, invalidation, visible_layer_rect,
frame_number, &invalid_tiles);
@@ -223,8 +217,7 @@ bool PicturePile::UpdateAndExpandInvalidation(
bool PicturePile::ApplyInvalidationAndResize(const gfx::Rect& interest_rect,
Region* invalidation,
const gfx::Size& layer_size,
- int frame_number,
- bool can_use_lcd_text_changed) {
+ int frame_number) {
bool updated = false;
Region synthetic_invalidation;
@@ -233,14 +226,6 @@ bool PicturePile::ApplyInvalidationAndResize(const gfx::Rect& interest_rect,
tiling_.SetTilingSize(layer_size);
updated = true;
}
- if (can_use_lcd_text_changed) {
- // When LCD text is enabled/disabled, we must drop any raster tiles for
- // the pile, so they can be recreated in a manner consistent with the new
- // setting. We do this with |synthetic_invalidation| since we don't need to
- // do a new recording, just invalidate rastered content.
- synthetic_invalidation.Union(gfx::Rect(GetSize()));
- updated = true;
- }
gfx::Rect interest_rect_over_tiles =
tiling_.ExpandRectToTileBounds(interest_rect);
@@ -593,9 +578,10 @@ void PicturePile::CreatePictures(ContentLayerClient* painter,
}
}
-scoped_refptr<RasterSource> PicturePile::CreateRasterSource() const {
+scoped_refptr<RasterSource> PicturePile::CreateRasterSource(
+ bool can_use_lcd_text) const {
return scoped_refptr<RasterSource>(
- PicturePileImpl::CreateFromPicturePile(this));
+ PicturePileImpl::CreateFromPicturePile(this, can_use_lcd_text));
}
gfx::Size PicturePile::GetSize() const {
« no previous file with comments | « cc/resources/picture_pile.h ('k') | cc/resources/picture_pile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698