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

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: Address review comments 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..68e9892eb48baa20999ca2f4e165700fd0a65e31 100644
--- a/cc/resources/gpu_raster_worker_pool.cc
+++ b/cc/resources/gpu_raster_worker_pool.cc
@@ -36,7 +36,10 @@ class RasterBufferImpl : public RasterBuffer {
const gfx::Rect& rect,
float scale,
RenderingStatsInstrumentation* stats) override {
- if (!lock_.sk_surface())
+ bool use_distance_field_text =
+ picture_pile->will_be_used_for_transform_animation();
+ SkSurface* sk_surface = lock_.GetSkSurface(use_distance_field_text);
+ if (!sk_surface)
return;
SkPictureRecorder recorder;
@@ -50,7 +53,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