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

Side by Side Diff: cc/raster/gpu_raster_buffer_provider.cc

Issue 2637223002: Don't use DF text during animations (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « cc/playback/raster_source.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/raster/gpu_raster_buffer_provider.h" 5 #include "cc/raster/gpu_raster_buffer_provider.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if (!sync_token.HasData()) 256 if (!sync_token.HasData())
257 return; 257 return;
258 // Synchronize with compositor. 258 // Synchronize with compositor.
259 gl->WaitSyncTokenCHROMIUM(sync_token.GetConstData()); 259 gl->WaitSyncTokenCHROMIUM(sync_token.GetConstData());
260 } 260 }
261 261
262 sk_sp<SkPicture> picture = PlaybackToPicture( 262 sk_sp<SkPicture> picture = PlaybackToPicture(
263 raster_source, resource_has_previous_content, resource_lock->size(), 263 raster_source, resource_has_previous_content, resource_lock->size(),
264 raster_full_rect, raster_dirty_rect, scales, playback_settings); 264 raster_full_rect, raster_dirty_rect, scales, playback_settings);
265 265
266 // Turn on distance fields for layers that have ever animated.
267 bool use_distance_field_text =
268 use_distance_field_text_ ||
269 raster_source->ShouldAttemptToUseDistanceFieldText();
270
271 RasterizePicture(picture.get(), worker_context_provider_, resource_lock, 266 RasterizePicture(picture.get(), worker_context_provider_, resource_lock,
272 async_worker_context_enabled_, use_distance_field_text, 267 async_worker_context_enabled_, use_distance_field_text_,
273 raster_source->CanUseLCDText(), msaa_sample_count_, 268 raster_source->CanUseLCDText(), msaa_sample_count_,
274 raster_source->image_decode_controller(), 269 raster_source->image_decode_controller(),
275 playback_settings.use_image_hijack_canvas); 270 playback_settings.use_image_hijack_canvas);
276 271
277 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM(); 272 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM();
278 273
279 // Barrier to sync worker context output to cc context. 274 // Barrier to sync worker context output to cc context.
280 gl->OrderingBarrierCHROMIUM(); 275 gl->OrderingBarrierCHROMIUM();
281 276
282 // Generate sync token after the barrier for cross context synchronization. 277 // Generate sync token after the barrier for cross context synchronization.
283 gpu::SyncToken resource_sync_token; 278 gpu::SyncToken resource_sync_token;
284 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); 279 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData());
285 resource_lock->set_sync_token(resource_sync_token); 280 resource_lock->set_sync_token(resource_sync_token);
286 resource_lock->set_synchronized(!async_worker_context_enabled_); 281 resource_lock->set_synchronized(!async_worker_context_enabled_);
287 } 282 }
288 283
289 } // namespace cc 284 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/raster_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698