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 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 21 matching lines...) Expand all Loading... |
32 bool CopyTexImage(unsigned target) override; | 32 bool CopyTexImage(unsigned target) override; |
33 bool CopyTexSubImage(unsigned target, | 33 bool CopyTexSubImage(unsigned target, |
34 const gfx::Point& offset, | 34 const gfx::Point& offset, |
35 const gfx::Rect& rect) override; | 35 const gfx::Rect& rect) override; |
36 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 36 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
37 int z_order, | 37 int z_order, |
38 gfx::OverlayTransform transform, | 38 gfx::OverlayTransform transform, |
39 const gfx::Rect& bounds_rect, | 39 const gfx::Rect& bounds_rect, |
40 const gfx::RectF& crop_rect) override; | 40 const gfx::RectF& crop_rect) override; |
41 | 41 |
42 static unsigned GetInternalFormatForTesting(gfx::BufferFormat format); | |
43 | |
44 protected: | 42 protected: |
45 ~GLImageMemory() override; | 43 ~GLImageMemory() override; |
46 | 44 |
47 gfx::BufferFormat format() const { return format_; } | 45 gfx::BufferFormat format() const { return format_; } |
48 size_t stride() const { return stride_; } | 46 size_t stride() const { return stride_; } |
49 | 47 |
50 private: | 48 private: |
51 const gfx::Size size_; | 49 const gfx::Size size_; |
52 const unsigned internalformat_; | 50 const unsigned internalformat_; |
53 const unsigned char* memory_; | 51 const unsigned char* memory_; |
54 gfx::BufferFormat format_; | 52 gfx::BufferFormat format_; |
55 size_t stride_; | 53 size_t stride_; |
56 | 54 |
57 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); | 55 DISALLOW_COPY_AND_ASSIGN(GLImageMemory); |
58 }; | 56 }; |
59 | 57 |
60 } // namespace gl | 58 } // namespace gl |
61 | 59 |
62 #endif // UI_GL_GL_IMAGE_MEMORY_H_ | 60 #endif // UI_GL_GL_IMAGE_MEMORY_H_ |
OLD | NEW |