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

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

Issue 2605273003: 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 if (async_worker_context_enabled_) { 207 if (async_worker_context_enabled_) {
208 // Early out if sync token is invalid. This happens if the compositor 208 // Early out if sync token is invalid. This happens if the compositor
209 // context was lost before ScheduleTasks was called. 209 // context was lost before ScheduleTasks was called.
210 if (!sync_token.HasData()) 210 if (!sync_token.HasData())
211 return; 211 return;
212 // Synchronize with compositor. 212 // Synchronize with compositor.
213 gl->WaitSyncTokenCHROMIUM(sync_token.GetConstData()); 213 gl->WaitSyncTokenCHROMIUM(sync_token.GetConstData());
214 } 214 }
215 215
216 // Turn on distance fields for layers that have ever animated.
217 bool use_distance_field_text =
218 use_distance_field_text_ ||
219 raster_source->ShouldAttemptToUseDistanceFieldText();
220
221 RasterizeSource(raster_source, resource_has_previous_content, 216 RasterizeSource(raster_source, resource_has_previous_content,
222 resource_lock->size(), raster_full_rect, raster_dirty_rect, 217 resource_lock->size(), raster_full_rect, raster_dirty_rect,
223 scales, playback_settings, worker_context_provider_, 218 scales, playback_settings, worker_context_provider_,
224 resource_lock, async_worker_context_enabled_, 219 resource_lock, async_worker_context_enabled_,
225 use_distance_field_text, msaa_sample_count_); 220 use_distance_field_text_, msaa_sample_count_);
226 221
227 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM(); 222 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM();
228 223
229 // Barrier to sync worker context output to cc context. 224 // Barrier to sync worker context output to cc context.
230 gl->OrderingBarrierCHROMIUM(); 225 gl->OrderingBarrierCHROMIUM();
231 226
232 // Generate sync token after the barrier for cross context synchronization. 227 // Generate sync token after the barrier for cross context synchronization.
233 gpu::SyncToken resource_sync_token; 228 gpu::SyncToken resource_sync_token;
234 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); 229 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData());
235 resource_lock->set_sync_token(resource_sync_token); 230 resource_lock->set_sync_token(resource_sync_token);
236 resource_lock->set_synchronized(!async_worker_context_enabled_); 231 resource_lock->set_synchronized(!async_worker_context_enabled_);
237 } 232 }
238 233
239 } // namespace cc 234 } // 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