| 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_STUB_H_ | 5 #ifndef UI_GL_GL_IMAGE_STUB_H_ |
| 6 #define UI_GL_GL_IMAGE_STUB_H_ | 6 #define UI_GL_GL_IMAGE_STUB_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ui/gl/gl_export.h" | 10 #include "ui/gl/gl_export.h" |
| 11 #include "ui/gl/gl_image.h" | 11 #include "ui/gl/gl_image.h" |
| 12 | 12 |
| 13 namespace gl { | 13 namespace gl { |
| 14 | 14 |
| 15 // A GLImage that does nothing for unit tests. | 15 // A GLImage that does nothing for unit tests. |
| 16 class GL_EXPORT GLImageStub : public GLImage { | 16 class GL_EXPORT GLImageStub : public GLImage { |
| 17 public: | 17 public: |
| 18 GLImageStub(); | 18 GLImageStub(); |
| 19 | 19 |
| 20 // Overridden from GLImage: | 20 // Overridden from GLImage: |
| 21 void Destroy(bool have_context) override {} | |
| 22 gfx::Size GetSize() override; | 21 gfx::Size GetSize() override; |
| 23 unsigned GetInternalFormat() override; | 22 unsigned GetInternalFormat() override; |
| 24 bool BindTexImage(unsigned target) override; | 23 bool BindTexImage(unsigned target) override; |
| 25 void ReleaseTexImage(unsigned target) override {} | 24 void ReleaseTexImage(unsigned target) override {} |
| 26 bool CopyTexImage(unsigned target) override; | 25 bool CopyTexImage(unsigned target) override; |
| 27 bool CopyTexSubImage(unsigned target, | 26 bool CopyTexSubImage(unsigned target, |
| 28 const gfx::Point& offset, | 27 const gfx::Point& offset, |
| 29 const gfx::Rect& rect) override; | 28 const gfx::Rect& rect) override; |
| 30 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 29 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 31 int z_order, | 30 int z_order, |
| 32 gfx::OverlayTransform transform, | 31 gfx::OverlayTransform transform, |
| 33 const gfx::Rect& bounds_rect, | 32 const gfx::Rect& bounds_rect, |
| 34 const gfx::RectF& crop_rect) override; | 33 const gfx::RectF& crop_rect) override; |
| 35 void Flush() override {} | 34 void Flush() override {} |
| 36 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 35 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 37 uint64_t process_tracing_id, | 36 uint64_t process_tracing_id, |
| 38 const std::string& dump_name) override {} | 37 const std::string& dump_name) override {} |
| 39 | 38 |
| 40 protected: | 39 protected: |
| 41 ~GLImageStub() override; | 40 ~GLImageStub() override; |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 } // namespace gl | 43 } // namespace gl |
| 45 | 44 |
| 46 #endif // UI_GL_GL_IMAGE_STUB_H_ | 45 #endif // UI_GL_GL_IMAGE_STUB_H_ |
| OLD | NEW |