| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Simply creates a texture. | 289 // Simply creates a texture. |
| 290 blink::WebGLId CreateTexture(); | 290 blink::WebGLId CreateTexture(); |
| 291 // Deletes a texture. | 291 // Deletes a texture. |
| 292 void DeleteTexture(blink::WebGLId texture_id); | 292 void DeleteTexture(blink::WebGLId texture_id); |
| 293 | 293 |
| 294 // Insert a sync point into the GL command buffer. | 294 // Insert a sync point into the GL command buffer. |
| 295 uint32 InsertSyncPoint(); | 295 uint32 InsertSyncPoint(); |
| 296 // Wait for the sync point before executing further GL commands. | 296 // Wait for the sync point before executing further GL commands. |
| 297 void WaitSyncPoint(uint32 sync_point); | 297 void WaitSyncPoint(uint32 sync_point); |
| 298 | 298 |
| 299 // Creates a mailbox that is attached to the given texture id, and a sync | 299 // Creates a mailbox holder that is attached to the given texture id, with a |
| 300 // point to wait on before using the mailbox. Returns an empty mailbox on | 300 // sync point to wait on before using the mailbox. Returns a holder with an |
| 301 // failure. | 301 // empty mailbox on failure. |
| 302 // Note the texture is assumed to be GL_TEXTURE_2D. | 302 // Note the texture is assumed to be GL_TEXTURE_2D. |
| 303 gpu::Mailbox ProduceMailboxFromTexture(blink::WebGLId texture_id, | 303 gpu::MailboxHolder ProduceMailboxHolderFromTexture(blink::WebGLId texture_id); |
| 304 uint32* sync_point); | |
| 305 | 304 |
| 306 // Creates a texture and consumes a mailbox into it. Returns 0 on failure. | 305 // Creates a texture and consumes a mailbox into it. Returns 0 on failure. |
| 307 // Note the mailbox is assumed to be GL_TEXTURE_2D. | 306 // Note the mailbox is assumed to be GL_TEXTURE_2D. |
| 308 blink::WebGLId ConsumeMailboxToTexture(const gpu::Mailbox& mailbox, | 307 blink::WebGLId ConsumeMailboxToTexture(const gpu::Mailbox& mailbox, |
| 309 uint32 sync_point); | 308 uint32 sync_point); |
| 310 | 309 |
| 311 // Resizes the texture's size to |size|. | 310 // Resizes the texture's size to |size|. |
| 312 void ResizeTexture(blink::WebGLId texture, const gfx::Size& size); | 311 void ResizeTexture(blink::WebGLId texture, const gfx::Size& size); |
| 313 | 312 |
| 314 // Copies the framebuffer data given in |rect| to |texture|. | 313 // Copies the framebuffer data given in |rect| to |texture|. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 const gpu::Mailbox& mailbox, | 400 const gpu::Mailbox& mailbox, |
| 402 uint32 sync_point, | 401 uint32 sync_point, |
| 403 const scoped_refptr<media::VideoFrame>& target, | 402 const scoped_refptr<media::VideoFrame>& target, |
| 404 const base::Callback<void(bool)>& callback) = 0; | 403 const base::Callback<void(bool)>& callback) = 0; |
| 405 virtual GLHelper::ScalerInterface* scaler() = 0; | 404 virtual GLHelper::ScalerInterface* scaler() = 0; |
| 406 }; | 405 }; |
| 407 | 406 |
| 408 } // namespace content | 407 } // namespace content |
| 409 | 408 |
| 410 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ | 409 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
| OLD | NEW |