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

Unified Diff: cc/resources/picture.cc

Issue 315393002: Record SkPicture with correct LCD text setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated unittests Created 6 years, 6 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 7147a156b0e28afa0b2b5151c85e9a57d916a3fd..a622674f19c8628b76b86fe08bc149ae2f142518 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -88,11 +88,12 @@ scoped_refptr<Picture> Picture::Create(
ContentLayerClient* client,
const SkTileGridFactory::TileGridInfo& tile_grid_info,
bool gather_pixel_refs,
+ bool can_use_lcd_text,
int num_raster_threads,
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, tile_grid_info, can_use_lcd_text, recording_mode);
if (gather_pixel_refs)
picture->GatherPixelRefs(tile_grid_info);
picture->CloneForDrawing(num_raster_threads);
@@ -250,6 +251,7 @@ void Picture::CloneForDrawing(int num_threads) {
void Picture::Record(ContentLayerClient* painter,
const SkTileGridFactory::TileGridInfo& tile_grid_info,
+ bool can_use_lcd_text,
RecordingMode recording_mode) {
TRACE_EVENT2("cc",
"Picture::Record",
@@ -311,8 +313,11 @@ void Picture::Record(ContentLayerClient* painter,
canvas->clipRect(layer_skrect);
gfx::RectF opaque_layer_rect;
- painter->PaintContents(
- canvas.get(), layer_rect_, &opaque_layer_rect, graphics_context_status);
+ painter->PaintContents(canvas.get(),
+ layer_rect_,
+ can_use_lcd_text,
+ &opaque_layer_rect,
+ graphics_context_status);
canvas->restore();
picture_ = skia::AdoptRef(recorder.endRecording());

Powered by Google App Engine
This is Rietveld 408576698