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

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

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: fixed typo 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
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 #ifndef CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 const SkRegion& old_damage); 240 const SkRegion& old_damage);
241 241
242 // Simply creates a texture. 242 // Simply creates a texture.
243 GLuint CreateTexture(); 243 GLuint CreateTexture();
244 // Deletes a texture. 244 // Deletes a texture.
245 void DeleteTexture(GLuint texture_id); 245 void DeleteTexture(GLuint texture_id);
246 246
247 // Insert a sync point into the GL command buffer. 247 // Insert a sync point into the GL command buffer.
248 uint32 InsertSyncPoint(); 248 uint32 InsertSyncPoint();
249 249
250 // Inserts a fence sync, flushes, and generates a sync token.
251 void GenerateSyncToken(gpu::SyncToken* sync_token);
252
250 // Wait for the sync token before executing further GL commands. 253 // Wait for the sync token before executing further GL commands.
251 void WaitSyncToken(const gpu::SyncToken& sync_token); 254 void WaitSyncToken(const gpu::SyncToken& sync_token);
252 255
253 // Creates a mailbox holder that is attached to the given texture id, with a 256 // Creates a mailbox holder that is attached to the given texture id, with a
254 // sync point to wait on before using the mailbox. Returns a holder with an 257 // sync point to wait on before using the mailbox. Returns a holder with an
255 // empty mailbox on failure. 258 // empty mailbox on failure.
256 // Note the texture is assumed to be GL_TEXTURE_2D. 259 // Note the texture is assumed to be GL_TEXTURE_2D.
257 gpu::MailboxHolder ProduceMailboxHolderFromTexture(GLuint texture_id); 260 gpu::MailboxHolder ProduceMailboxHolderFromTexture(GLuint texture_id);
258 261
259 // Creates a texture and consumes a mailbox into it. Returns 0 on failure. 262 // Creates a texture and consumes a mailbox into it. Returns 0 on failure.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 const gpu::SyncToken& sync_token, 376 const gpu::SyncToken& sync_token,
374 const scoped_refptr<media::VideoFrame>& target, 377 const scoped_refptr<media::VideoFrame>& target,
375 const gfx::Point& paste_location, 378 const gfx::Point& paste_location,
376 const base::Callback<void(bool)>& callback) = 0; 379 const base::Callback<void(bool)>& callback) = 0;
377 virtual GLHelper::ScalerInterface* scaler() = 0; 380 virtual GLHelper::ScalerInterface* scaler() = 0;
378 }; 381 };
379 382
380 } // namespace content 383 } // namespace content
381 384
382 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 385 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/client/gl_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698