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

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

Issue 2885533002: cc: Allocate resources on worker context.
Patch Set: fix tests Created 3 years, 7 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
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 use_distance_field_text_, msaa_sample_count_); 274 use_distance_field_text_, msaa_sample_count_);
275 275
276 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM(); 276 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM();
277 277
278 // Barrier to sync worker context output to cc context. 278 // Barrier to sync worker context output to cc context.
279 gl->OrderingBarrierCHROMIUM(); 279 gl->OrderingBarrierCHROMIUM();
280 280
281 // Generate sync token after the barrier for cross context synchronization. 281 // Generate sync token after the barrier for cross context synchronization.
282 gpu::SyncToken resource_sync_token; 282 gpu::SyncToken resource_sync_token;
283 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); 283 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData());
284 resource_lock->set_sync_token(resource_sync_token); 284 resource_lock->UpdateSyncToken(resource_sync_token);
285 resource_lock->set_synchronized(!async_worker_context_enabled_);
286 } 285 }
287 286
288 } // namespace cc 287 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/raster/one_copy_raster_buffer_provider.cc » ('j') | cc/resources/resource_provider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698