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

Side by Side Diff: content/common/gpu/client/gl_helper.cc

Issue 1414793018: Revert of Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « content/common/gpu/client/gl_helper.h ('k') | content/common/gpu/client/gpu_channel_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/gpu/client/gl_helper.h" 5 #include "content/common/gpu/client/gl_helper.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 947 gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
948 return texture; 948 return texture;
949 } 949 }
950 950
951 void GLHelper::DeleteTexture(GLuint texture_id) { 951 void GLHelper::DeleteTexture(GLuint texture_id) {
952 gl_->DeleteTextures(1, &texture_id); 952 gl_->DeleteTextures(1, &texture_id);
953 } 953 }
954 954
955 uint32 GLHelper::InsertSyncPoint() { return gl_->InsertSyncPointCHROMIUM(); } 955 uint32 GLHelper::InsertSyncPoint() { return gl_->InsertSyncPointCHROMIUM(); }
956 956
957 void GLHelper::GenerateSyncToken(gpu::SyncToken* sync_token) {
958 const uint64_t fence_sync = gl_->InsertFenceSyncCHROMIUM();
959 gl_->ShallowFlushCHROMIUM();
960 gl_->GenSyncTokenCHROMIUM(fence_sync, sync_token->GetData());
961 }
962
963 void GLHelper::WaitSyncToken(const gpu::SyncToken& sync_token) { 957 void GLHelper::WaitSyncToken(const gpu::SyncToken& sync_token) {
964 gl_->WaitSyncTokenCHROMIUM(sync_token.GetConstData()); 958 gl_->WaitSyncTokenCHROMIUM(sync_token.GetConstData());
965 } 959 }
966 960
967 gpu::MailboxHolder GLHelper::ProduceMailboxHolderFromTexture( 961 gpu::MailboxHolder GLHelper::ProduceMailboxHolderFromTexture(
968 GLuint texture_id) { 962 GLuint texture_id) {
969 gpu::Mailbox mailbox; 963 gpu::Mailbox mailbox;
970 gl_->GenMailboxCHROMIUM(mailbox.name); 964 gl_->GenMailboxCHROMIUM(mailbox.name);
971 gl_->ProduceTextureDirectCHROMIUM(texture_id, GL_TEXTURE_2D, mailbox.name); 965 gl_->ProduceTextureDirectCHROMIUM(texture_id, GL_TEXTURE_2D, mailbox.name);
972 return gpu::MailboxHolder(mailbox, gpu::SyncToken(InsertSyncPoint()), 966 return gpu::MailboxHolder(mailbox, gpu::SyncToken(InsertSyncPoint()),
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 InitCopyTextToImpl(); 1370 InitCopyTextToImpl();
1377 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality, 1371 return copy_texture_to_impl_->CreateReadbackPipelineYUV(quality,
1378 src_size, 1372 src_size,
1379 src_subrect, 1373 src_subrect,
1380 dst_size, 1374 dst_size,
1381 flip_vertically, 1375 flip_vertically,
1382 use_mrt); 1376 use_mrt);
1383 } 1377 }
1384 1378
1385 } // namespace content 1379 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper.h ('k') | content/common/gpu/client/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698