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

Side by Side Diff: ui/gl/gl_image.h

Issue 180723023: gpu: Mailbox emulation with EGLImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments, fix a bug Created 6 years, 9 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
« no previous file with comments | « ui/gl/gl_fence.cc ('k') | ui/gl/gl_image.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_GL_GL_IMAGE_H_ 5 #ifndef UI_GL_GL_IMAGE_H_
6 #define UI_GL_GL_IMAGE_H_ 6 #define UI_GL_GL_IMAGE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/gpu_memory_buffer.h" 9 #include "ui/gfx/gpu_memory_buffer.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 21 matching lines...) Expand all
32 32
33 // Release image from texture currently bound to |target|. 33 // Release image from texture currently bound to |target|.
34 virtual void ReleaseTexImage(unsigned target); 34 virtual void ReleaseTexImage(unsigned target);
35 35
36 // Called before the texture is used for drawing. 36 // Called before the texture is used for drawing.
37 virtual void WillUseTexImage(); 37 virtual void WillUseTexImage();
38 38
39 // Called after the texture has been used for drawing. 39 // Called after the texture has been used for drawing.
40 virtual void DidUseTexImage(); 40 virtual void DidUseTexImage();
41 41
42 // Called before the texture image data will be modified.
43 virtual void WillModifyTexImage();
44
45 // Called after the texture image data has been modified.
46 virtual void DidModifyTexImage();
reveman 2014/03/12 22:53:02 while here, do you mind making these and all funct
47
42 // Indicate that image should be released after use. 48 // Indicate that image should be released after use.
43 // (For an Android work-around only). 49 // (For an Android work-around only).
44 virtual void SetReleaseAfterUse(); 50 virtual void SetReleaseAfterUse();
45 51
46 // Create a GL image for a window. 52 // Create a GL image for a window.
47 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); 53 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window);
48 54
49 // Create a GL image for a GPU Memory buffer. 55 // Create a GL image for a GPU Memory buffer.
50 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( 56 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer(
51 gfx::GpuMemoryBufferHandle buffer, 57 gfx::GpuMemoryBufferHandle buffer,
52 gfx::Size size, 58 gfx::Size size,
53 unsigned internalformat); 59 unsigned internalformat);
54 60
55 protected: 61 protected:
56 virtual ~GLImage(); 62 virtual ~GLImage();
57 63
58 private: 64 private:
59 friend class base::RefCounted<GLImage>; 65 friend class base::RefCounted<GLImage>;
60 66
61 DISALLOW_COPY_AND_ASSIGN(GLImage); 67 DISALLOW_COPY_AND_ASSIGN(GLImage);
62 }; 68 };
63 69
64 } // namespace gfx 70 } // namespace gfx
65 71
66 #endif // UI_GL_GL_IMAGE_H_ 72 #endif // UI_GL_GL_IMAGE_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_fence.cc ('k') | ui/gl/gl_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698