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

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

Issue 1152693002: ui: Add sub region copy support to GLImage::CopyTexImage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | ui/gl/gl_image_egl.h » ('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/geometry/point.h"
9 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/geometry/rect_f.h" 11 #include "ui/gfx/geometry/rect_f.h"
11 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 #include "ui/gfx/overlay_transform.h" 14 #include "ui/gfx/overlay_transform.h"
14 #include "ui/gl/gl_export.h" 15 #include "ui/gl/gl_export.h"
15 16
16 namespace gfx { 17 namespace gfx {
17 18
18 // Encapsulates an image that can be bound to a texture, hiding platform 19 // Encapsulates an image that can be bound to a texture, hiding platform
(...skipping 10 matching lines...) Expand all
29 30
30 // Get the internal format of the image. 31 // Get the internal format of the image.
31 virtual unsigned GetInternalFormat() = 0; 32 virtual unsigned GetInternalFormat() = 0;
32 33
33 // Bind image to texture currently bound to |target|. 34 // Bind image to texture currently bound to |target|.
34 virtual bool BindTexImage(unsigned target) = 0; 35 virtual bool BindTexImage(unsigned target) = 0;
35 36
36 // Release image from texture currently bound to |target|. 37 // Release image from texture currently bound to |target|.
37 virtual void ReleaseTexImage(unsigned target) = 0; 38 virtual void ReleaseTexImage(unsigned target) = 0;
38 39
39 // Copy image to texture currently bound to |target|. 40 // Copy |rect| of image to |offset| in texture currently bound to |target|.
40 virtual bool CopyTexImage(unsigned target) = 0; 41 virtual bool CopyTexSubImage(unsigned target,
42 const Point& offset,
43 const Rect& rect) = 0;
41 44
42 // Called before the texture is used for drawing. 45 // Called before the texture is used for drawing.
43 virtual void WillUseTexImage() = 0; 46 virtual void WillUseTexImage() = 0;
44 47
45 // Called after the texture has been used for drawing. 48 // Called after the texture has been used for drawing.
46 virtual void DidUseTexImage() = 0; 49 virtual void DidUseTexImage() = 0;
47 50
48 // Called before the texture image data will be modified. 51 // Called before the texture image data will be modified.
49 virtual void WillModifyTexImage() = 0; 52 virtual void WillModifyTexImage() = 0;
50 53
(...skipping 12 matching lines...) Expand all
63 66
64 private: 67 private:
65 friend class base::RefCounted<GLImage>; 68 friend class base::RefCounted<GLImage>;
66 69
67 DISALLOW_COPY_AND_ASSIGN(GLImage); 70 DISALLOW_COPY_AND_ASSIGN(GLImage);
68 }; 71 };
69 72
70 } // namespace gfx 73 } // namespace gfx
71 74
72 #endif // UI_GL_GL_IMAGE_H_ 75 #endif // UI_GL_GL_IMAGE_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | ui/gl/gl_image_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698