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

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: Update a more comments 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
« no previous file with comments | « gpu/config/gpu_driver_bug_workaround_type.h ('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 19 matching lines...) Expand all
30 // Bind image to texture currently bound to GL_TEXTURE_2D target. 30 // Bind image to texture currently bound to GL_TEXTURE_2D target.
31 virtual bool BindTexImage(); 31 virtual bool BindTexImage();
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 // If |release_tex_image| is false, then skip releasing image from texture
41 // currently bound to GL_TEXTURE_2D.
42 virtual void DidUseTexImage(bool release_tex_image);
reveman 2013/11/12 16:39:42 Bind/release as part of Will/DidUseTexImage is an
boliu 2013/11/12 16:47:47 Ahh, that's why this felt so weird. Yes, SetUnbind
41 43
42 // Create a GL image for a window. 44 // Create a GL image for a window.
43 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window); 45 static scoped_refptr<GLImage> CreateGLImage(gfx::PluginWindowHandle window);
44 46
45 // Create a GL image for a GPU Memory buffer. 47 // Create a GL image for a GPU Memory buffer.
46 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer( 48 static scoped_refptr<GLImage> CreateGLImageForGpuMemoryBuffer(
47 gfx::GpuMemoryBufferHandle buffer, 49 gfx::GpuMemoryBufferHandle buffer,
48 gfx::Size size, 50 gfx::Size size,
49 unsigned internalformat); 51 unsigned internalformat);
50 52
51 protected: 53 protected:
52 virtual ~GLImage(); 54 virtual ~GLImage();
53 55
54 private: 56 private:
55 friend class base::RefCounted<GLImage>; 57 friend class base::RefCounted<GLImage>;
56 58
57 DISALLOW_COPY_AND_ASSIGN(GLImage); 59 DISALLOW_COPY_AND_ASSIGN(GLImage);
58 }; 60 };
59 61
60 } // namespace gfx 62 } // namespace gfx
61 63
62 #endif // UI_GL_GL_IMAGE_H_ 64 #endif // UI_GL_GL_IMAGE_H_
OLDNEW
« no previous file with comments | « gpu/config/gpu_driver_bug_workaround_type.h ('k') | ui/gl/gl_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698