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

Unified Diff: cc/resources/picture.cc

Issue 684653004: Plumb can_use_lcd_text, contents_opaque directly to ContentLayerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index c35da96848e937b6b717874f7149d5ceba588a50..b4ab8de0bd2dbeee0c2fdb4e7d3007d3a1e42418 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -86,12 +86,18 @@ bool DecodeBitmap(const void* buffer, size_t size, SkBitmap* bm) {
scoped_refptr<Picture> Picture::Create(
const gfx::Rect& layer_rect,
ContentLayerClient* client,
+ bool can_use_lcd_text,
+ bool contents_opaque,
const SkTileGridFactory::TileGridInfo& tile_grid_info,
bool gather_pixel_refs,
RecordingMode recording_mode) {
scoped_refptr<Picture> picture = make_scoped_refptr(new Picture(layer_rect));
- picture->Record(client, tile_grid_info, recording_mode);
+ picture->Record(client,
+ can_use_lcd_text,
+ contents_opaque,
+ tile_grid_info,
+ recording_mode);
if (gather_pixel_refs)
picture->GatherPixelRefs(tile_grid_info);
@@ -198,6 +204,8 @@ bool Picture::HasText() const {
}
void Picture::Record(ContentLayerClient* painter,
+ bool can_use_lcd_text,
+ bool contents_opaque,
const SkTileGridFactory::TileGridInfo& tile_grid_info,
RecordingMode recording_mode) {
TRACE_EVENT2("cc",
@@ -249,7 +257,11 @@ void Picture::Record(ContentLayerClient* painter,
layer_rect_.height());
canvas->clipRect(layer_skrect);
- painter->PaintContents(canvas.get(), layer_rect_, graphics_context_status);
+ painter->PaintContents(canvas.get(),
+ layer_rect_,
+ can_use_lcd_text,
+ contents_opaque,
+ graphics_context_status);
canvas->restore();
picture_ = skia::AdoptRef(recorder.endRecording());

Powered by Google App Engine
This is Rietveld 408576698