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

Unified Diff: cc/resources/gpu_raster_worker_pool.cc

Issue 648293006: cc: turn on distance field text on animated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "removed test code" 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/gpu_raster_worker_pool.cc
diff --git a/cc/resources/gpu_raster_worker_pool.cc b/cc/resources/gpu_raster_worker_pool.cc
index 2d1e888a6388f67fd48aff1548ae4cbe6e4f5873..8e16611e668b0f0a8bc9189c612b8d3cf775b0f9 100644
--- a/cc/resources/gpu_raster_worker_pool.cc
+++ b/cc/resources/gpu_raster_worker_pool.cc
@@ -36,7 +36,12 @@ class RasterBufferImpl : public RasterBuffer {
const gfx::Rect& rect,
float scale,
RenderingStatsInstrumentation* stats) override {
- if (!lock_.sk_surface())
+ // Turn on distance fields for layers that have ever animated.
+ bool use_distance_field_text =
+ picture_pile->will_be_used_for_transform_animation();
reveman 2014/10/20 18:38:29 This line should also take LayerTreeSettings::use_
+ SkSurface* sk_surface = lock_.GetSkSurface(use_distance_field_text);
+
+ if (!sk_surface)
return;
SkPictureRecorder recorder;
@@ -50,7 +55,7 @@ class RasterBufferImpl : public RasterBuffer {
// Add the canvas and recorded picture to |multi_picture_draw_|.
skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording());
- multi_picture_draw_->add(lock_.sk_surface()->getCanvas(), picture.get());
+ multi_picture_draw_->add(sk_surface->getCanvas(), picture.get());
}
private:

Powered by Google App Engine
This is Rietveld 408576698