OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MEMORY_H_ | 5 #ifndef UI_GL_GL_IMAGE_MEMORY_H_ |
6 #define UI_GL_GL_IMAGE_MEMORY_H_ | 6 #define UI_GL_GL_IMAGE_MEMORY_H_ |
7 | 7 |
8 #include "ui/gl/gl_image.h" | 8 #include "ui/gl/gl_image.h" |
9 | 9 |
10 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ | 10 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ |
(...skipping 28 matching lines...) Expand all Loading... |
39 const Rect& rect) override; | 39 const Rect& rect) override; |
40 void WillUseTexImage() override; | 40 void WillUseTexImage() override; |
41 void DidUseTexImage() override; | 41 void DidUseTexImage() override; |
42 void WillModifyTexImage() override {} | 42 void WillModifyTexImage() override {} |
43 void DidModifyTexImage() override {} | 43 void DidModifyTexImage() override {} |
44 bool ScheduleOverlayPlane(AcceleratedWidget widget, | 44 bool ScheduleOverlayPlane(AcceleratedWidget widget, |
45 int z_order, | 45 int z_order, |
46 OverlayTransform transform, | 46 OverlayTransform transform, |
47 const Rect& bounds_rect, | 47 const Rect& bounds_rect, |
48 const RectF& crop_rect) override; | 48 const RectF& crop_rect) override; |
| 49 |
| 50 // Only dumps the GLTexture portion of the memory usage. Subclasses are |
| 51 // responsible for dumping the CPU-side memory. |
49 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 52 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
50 uint64_t process_tracing_id, | 53 uint64_t process_tracing_id, |
51 const std::string& dump_name) override; | 54 const std::string& dump_name) override; |
52 | 55 |
53 protected: | 56 protected: |
54 ~GLImageMemory() override; | 57 ~GLImageMemory() override; |
55 | 58 |
56 BufferFormat format() const { return format_; } | 59 BufferFormat format() const { return format_; } |
57 | 60 |
58 private: | 61 private: |
(...skipping 11 matching lines...) Expand all Loading... |
70 unsigned egl_texture_id_; | 73 unsigned egl_texture_id_; |
71 EGLImageKHR egl_image_; | 74 EGLImageKHR egl_image_; |
72 #endif | 75 #endif |
73 | 76 |
74 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); | 77 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); |
75 }; | 78 }; |
76 | 79 |
77 } // namespace gfx | 80 } // namespace gfx |
78 | 81 |
79 #endif // UI_GL_GL_IMAGE_MEMORY_H_ | 82 #endif // UI_GL_GL_IMAGE_MEMORY_H_ |
OLD | NEW |