Index: ui/gl/gl_image_memory.h |
diff --git a/ui/gl/gl_image_memory.h b/ui/gl/gl_image_memory.h |
index 067e4fbd2834d19e500dea9fe900c85d6cd4f87e..2d6b93e245d83998dd3577bd66f197bb6b78605d 100644 |
--- a/ui/gl/gl_image_memory.h |
+++ b/ui/gl/gl_image_memory.h |
@@ -13,13 +13,18 @@ |
#include <EGL/eglext.h> |
#endif |
+#include "ui/gfx/gpu_memory_buffer.h" |
+ |
namespace gfx { |
class GL_EXPORT GLImageMemory : public GLImage { |
public: |
GLImageMemory(const gfx::Size& size, unsigned internalformat); |
- bool Initialize(const unsigned char* memory); |
+ static size_t BytesPerPixel(gfx::GpuMemoryBuffer::Format format); |
+ |
+ bool Initialize(const unsigned char* memory, |
+ gfx::GpuMemoryBuffer::Format format); |
// Overridden from GLImage: |
virtual void Destroy(bool have_context) override; |
@@ -40,15 +45,13 @@ class GL_EXPORT GLImageMemory : public GLImage { |
protected: |
virtual ~GLImageMemory(); |
- bool HasValidFormat() const; |
- size_t Bytes() const; |
- |
private: |
void DoBindTexImage(unsigned target); |
- const unsigned char* memory_; |
const gfx::Size size_; |
const unsigned internalformat_; |
+ const unsigned char* memory_; |
+ gfx::GpuMemoryBuffer::Format format_; |
bool in_use_; |
unsigned target_; |
bool need_do_bind_tex_image_; |