OLD | NEW |
---|---|
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/native_widget_types.h" | |
10 #include "ui/gfx/overlay_transform.h" | |
11 #include "ui/gfx/rect.h" | |
12 #include "ui/gfx/rect_f.h" | |
9 #include "ui/gfx/size.h" | 13 #include "ui/gfx/size.h" |
10 #include "ui/gl/gl_export.h" | 14 #include "ui/gl/gl_export.h" |
11 | 15 |
12 namespace gfx { | 16 namespace gfx { |
13 | 17 |
14 // Encapsulates an image that can be bound to a texture, hiding platform | 18 // Encapsulates an image that can be bound to a texture, hiding platform |
15 // specific management. | 19 // specific management. |
16 class GL_EXPORT GLImage : public base::RefCounted<GLImage> { | 20 class GL_EXPORT GLImage : public base::RefCounted<GLImage> { |
17 public: | 21 public: |
18 GLImage(); | 22 GLImage(); |
(...skipping 15 matching lines...) Expand all Loading... | |
34 | 38 |
35 // Called after the texture has been used for drawing. | 39 // Called after the texture has been used for drawing. |
36 virtual void DidUseTexImage() = 0; | 40 virtual void DidUseTexImage() = 0; |
37 | 41 |
38 // Called before the texture image data will be modified. | 42 // Called before the texture image data will be modified. |
39 virtual void WillModifyTexImage() = 0; | 43 virtual void WillModifyTexImage() = 0; |
40 | 44 |
41 // Called after the texture image data has been modified. | 45 // Called after the texture image data has been modified. |
42 virtual void DidModifyTexImage() = 0; | 46 virtual void DidModifyTexImage() = 0; |
43 | 47 |
48 // Schedule image as an overlay plane to be shown at swap time for |widget|. | |
reveman
2014/07/31 18:40:32
Note: I think this comment is enough here. I'd rat
| |
49 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | |
50 int z_order, | |
51 OverlayTransform transform, | |
52 const Rect& bounds_rect, | |
53 const RectF& crop_rect) = 0; | |
54 | |
44 // Indicate that image should be released after use. | 55 // Indicate that image should be released after use. |
45 // (For an Android work-around only). | 56 // (For an Android work-around only). |
46 virtual void SetReleaseAfterUse(); | 57 virtual void SetReleaseAfterUse(); |
47 | 58 |
48 protected: | 59 protected: |
49 virtual ~GLImage(); | 60 virtual ~GLImage(); |
50 | 61 |
51 private: | 62 private: |
52 friend class base::RefCounted<GLImage>; | 63 friend class base::RefCounted<GLImage>; |
53 | 64 |
54 DISALLOW_COPY_AND_ASSIGN(GLImage); | 65 DISALLOW_COPY_AND_ASSIGN(GLImage); |
55 }; | 66 }; |
56 | 67 |
57 } // namespace gfx | 68 } // namespace gfx |
58 | 69 |
59 #endif // UI_GL_GL_IMAGE_H_ | 70 #endif // UI_GL_GL_IMAGE_H_ |
OLD | NEW |