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

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

Issue 66033009: [Android] Add workaround to unbind gpu memory buffer only on NVIDIA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comma Created 7 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 | 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 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 GL_TEXTURE_2D target. 33 // Release image from texture currently bound to GL_TEXTURE_2D target.
34 virtual void ReleaseTexImage(); 34 virtual void ReleaseTexImage();
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 // Indicate that the DidUse should release image in DidUse.
reveman 2013/11/12 20:56:54 Please rephrase this comment. Maybe "Indicate that
boliu 2013/11/12 21:06:50 Done.
43 // (For an Android work-around only).
44 virtual void SetReleaseAfterUse();
45
42 // Create a GL image for a window. 46 // Create a GL image for a window.
43 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); 47 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window);
44 48
45 // Create a GL image for a GPU Memory buffer. 49 // Create a GL image for a GPU Memory buffer.
46 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( 50 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer(
47 gfx::GpuMemoryBufferHandle buffer, 51 gfx::GpuMemoryBufferHandle buffer,
48 gfx::Size size, 52 gfx::Size size,
49 unsigned internalformat); 53 unsigned internalformat);
50 54
51 protected: 55 protected:
52 virtual ~GLImage(); 56 virtual ~GLImage();
53 57
54 private: 58 private:
55 friend class base::RefCounted<GLImage>; 59 friend class base::RefCounted<GLImage>;
56 60
57 DISALLOW_COPY_AND_ASSIGN(GLImage); 61 DISALLOW_COPY_AND_ASSIGN(GLImage);
58 }; 62 };
59 63
60 } // namespace gfx 64 } // namespace gfx
61 65
62 #endif // UI_GL_GL_IMAGE_H_ 66 #endif // UI_GL_GL_IMAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698