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

Unified Diff: cc/resources/video_resource_updater.cc

Issue 1429213002: Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shallow flush before image creation Created 5 years, 1 month 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/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index fd3221258de64ece6c64980a144eb95a29f424db..033597f7dde4ea6c00ad9d0e4e5c2ff82a126126 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -75,13 +75,14 @@ class SyncTokenClientImpl : public media::VideoFrame::SyncTokenClient {
const gpu::SyncToken& sync_token)
: gl_(gl), sync_token_(sync_token) {}
~SyncTokenClientImpl() override {}
- uint32 InsertSyncPoint() override {
+ void GenerateSyncToken(gpu::SyncToken* sync_token) override {
if (sync_token_.HasData()) {
- DCHECK_EQ(gpu::CommandBufferNamespace::OLD_SYNC_POINTS,
- sync_token_.namespace_id());
- return static_cast<uint32>(sync_token_.release_count());
+ *sync_token = sync_token_;
+ } else {
+ const uint64_t fence_sync = gl_->InsertFenceSyncCHROMIUM();
+ gl_->Flush();
piman 2015/11/05 00:04:36 ShallowFlushCHROMIUM instead off Flush: - it doesn
David Yen 2015/11/05 00:34:27 Done.
+ gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token->GetData());
}
- return gl_->InsertSyncPointCHROMIUM();
}
void WaitSyncToken(const gpu::SyncToken& sync_token) override {
if (sync_token.HasData()) {
« no previous file with comments | « no previous file | cc/test/test_gpu_memory_buffer_manager.h » ('j') | content/common/gpu/client/command_buffer_proxy_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698