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

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

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: c301e01d Rebase. Created 6 years, 11 months 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 | Annotate | Revision Log
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. Returns
danakj 2014/01/06 20:13:42 ", with a sync point to wait on before using the m
sheu 2014/01/06 22:44:44 Done.
300 // point to wait on before using the mailbox. Returns an empty mailbox on 300 // a holder with an empty mailbox on failure.
301 // failure.
302 // Note the texture is assumed to be GL_TEXTURE_2D. 301 // Note the texture is assumed to be GL_TEXTURE_2D.
303 gpu::Mailbox ProduceMailboxFromTexture(blink::WebGLId texture_id, 302 gpu::MailboxHolder ProduceMailboxHolderFromTexture(blink::WebGLId texture_id);
304 uint32* sync_point);
305 303
306 // Creates a texture and consumes a mailbox into it. Returns 0 on failure. 304 // Creates a texture and consumes a mailbox into it. Returns 0 on failure.
307 // Note the mailbox is assumed to be GL_TEXTURE_2D. 305 // Note the mailbox is assumed to be GL_TEXTURE_2D.
308 blink::WebGLId ConsumeMailboxToTexture(const gpu::Mailbox& mailbox, 306 blink::WebGLId ConsumeMailboxToTexture(const gpu::Mailbox& mailbox,
309 uint32 sync_point); 307 uint32 sync_point);
310 308
311 // Resizes the texture's size to |size|. 309 // Resizes the texture's size to |size|.
312 void ResizeTexture(blink::WebGLId texture, const gfx::Size& size); 310 void ResizeTexture(blink::WebGLId texture, const gfx::Size& size);
313 311
314 // Copies the framebuffer data given in |rect| to |texture|. 312 // Copies the framebuffer data given in |rect| to |texture|.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 const gpu::Mailbox& mailbox, 399 const gpu::Mailbox& mailbox,
402 uint32 sync_point, 400 uint32 sync_point,
403 const scoped_refptr<media::VideoFrame>& target, 401 const scoped_refptr<media::VideoFrame>& target,
404 const base::Callback<void(bool)>& callback) = 0; 402 const base::Callback<void(bool)>& callback) = 0;
405 virtual GLHelper::ScalerInterface* scaler() = 0; 403 virtual GLHelper::ScalerInterface* scaler() = 0;
406 }; 404 };
407 405
408 } // namespace content 406 } // namespace content
409 407
410 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ 408 #endif // CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698