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

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

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
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
253 // Wait for the sync token before executing further GL commands. 250 // Wait for the sync token before executing further GL commands.
254 void WaitSyncToken(const gpu::SyncToken& sync_token); 251 void WaitSyncToken(const gpu::SyncToken& sync_token);
255 252
256 // Creates a mailbox holder that is attached to the given texture id, with a 253 // Creates a mailbox holder that is attached to the given texture id, with a
257 // sync point to wait on before using the mailbox. Returns a holder with an 254 // sync point to wait on before using the mailbox. Returns a holder with an
258 // empty mailbox on failure. 255 // empty mailbox on failure.
259 // Note the texture is assumed to be GL_TEXTURE_2D. 256 // Note the texture is assumed to be GL_TEXTURE_2D.
260 gpu::MailboxHolder ProduceMailboxHolderFromTexture(GLuint texture_id); 257 gpu::MailboxHolder ProduceMailboxHolderFromTexture(GLuint texture_id);
261 258
262 // Creates a texture and consumes a mailbox into it. Returns 0 on failure. 259 // 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
376 const gpu::SyncToken& sync_token, 373 const gpu::SyncToken& sync_token,
377 const scoped_refptr<media::VideoFrame>& target, 374 const scoped_refptr<media::VideoFrame>& target,
378 const gfx::Point& paste_location, 375 const gfx::Point& paste_location,
379 const base::Callback<void(bool)>& callback) = 0; 376 const base::Callback<void(bool)>& callback) = 0;
380 virtual GLHelper::ScalerInterface* scaler() = 0; 377 virtual GLHelper::ScalerInterface* scaler() = 0;
381 }; 378 };
382 379
383 } // namespace content 380 } // namespace content
384 381
385 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 382 #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