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/geometry/point.h" | 9 #include "ui/gfx/geometry/point.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
11 #include "ui/gfx/geometry/rect_f.h" | 11 #include "ui/gfx/geometry/rect_f.h" |
12 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
14 #include "ui/gfx/overlay_transform.h" | 14 #include "ui/gfx/overlay_transform.h" |
15 #include "ui/gl/gl_export.h" | 15 #include "ui/gl/gl_export.h" |
16 | 16 |
17 namespace base { | |
18 namespace trace_event { | |
19 class ProcessMemoryDump; | |
20 } // trace_event | |
21 } // base | |
reveman
2015/08/18 08:32:52
nit: not sure the closing "}" comments are needed
ericrk
2015/08/18 09:00:47
Done.
| |
22 | |
17 namespace gfx { | 23 namespace gfx { |
18 | 24 |
19 // Encapsulates an image that can be bound to a texture, hiding platform | 25 // Encapsulates an image that can be bound to a texture, hiding platform |
20 // specific management. | 26 // specific management. |
21 class GL_EXPORT GLImage : public base::RefCounted<GLImage> { | 27 class GL_EXPORT GLImage : public base::RefCounted<GLImage> { |
22 public: | 28 public: |
23 GLImage() {} | 29 GLImage() {} |
24 | 30 |
25 // Destroys the image. | 31 // Destroys the image. |
26 virtual void Destroy(bool have_context) = 0; | 32 virtual void Destroy(bool have_context) = 0; |
(...skipping 27 matching lines...) Expand all Loading... | |
54 // Called after the texture image data has been modified. | 60 // Called after the texture image data has been modified. |
55 virtual void DidModifyTexImage() = 0; | 61 virtual void DidModifyTexImage() = 0; |
56 | 62 |
57 // Schedule image as an overlay plane to be shown at swap time for |widget|. | 63 // Schedule image as an overlay plane to be shown at swap time for |widget|. |
58 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 64 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
59 int z_order, | 65 int z_order, |
60 OverlayTransform transform, | 66 OverlayTransform transform, |
61 const Rect& bounds_rect, | 67 const Rect& bounds_rect, |
62 const RectF& crop_rect) = 0; | 68 const RectF& crop_rect) = 0; |
63 | 69 |
70 virtual void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | |
reveman
2015/08/18 08:32:52
All other functions have a short comment that desc
ericrk
2015/08/18 09:00:47
Done.
| |
71 uint64_t process_tracing_id, | |
72 const std::string& dump_name) = 0; | |
73 | |
64 protected: | 74 protected: |
65 virtual ~GLImage() {} | 75 virtual ~GLImage() {} |
66 | 76 |
67 private: | 77 private: |
68 friend class base::RefCounted<GLImage>; | 78 friend class base::RefCounted<GLImage>; |
69 | 79 |
70 DISALLOW_COPY_AND_ASSIGN(GLImage); | 80 DISALLOW_COPY_AND_ASSIGN(GLImage); |
71 }; | 81 }; |
72 | 82 |
73 } // namespace gfx | 83 } // namespace gfx |
74 | 84 |
75 #endif // UI_GL_GL_IMAGE_H_ | 85 #endif // UI_GL_GL_IMAGE_H_ |
OLD | NEW |