OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |