| Index: ui/gl/gl_image_memory.cc
|
| diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
|
| index e0375239bf263cdd097bf966959b9f269bc2cdb4..20e694ff2fc322d622370749b3d97c5345492f67 100644
|
| --- a/ui/gl/gl_image_memory.cc
|
| +++ b/ui/gl/gl_image_memory.cc
|
| @@ -363,6 +363,13 @@ GLImageMemory::GLImageMemory(const gfx::Size& size, unsigned internalformat)
|
|
|
| GLImageMemory::~GLImageMemory() {}
|
|
|
| +// static
|
| +GLImageMemory* GLImageMemory::FromGLImage(GLImage* image) {
|
| + if (!image || image->GetType() != Type::MEMORY)
|
| + return nullptr;
|
| + return static_cast<GLImageMemory*>(image);
|
| +}
|
| +
|
| bool GLImageMemory::Initialize(const unsigned char* memory,
|
| gfx::BufferFormat format,
|
| size_t stride) {
|
| @@ -499,6 +506,10 @@ bool GLImageMemory::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
|
| return false;
|
| }
|
|
|
| +GLImageMemory::Type GLImageMemory::GetType() const {
|
| + return Type::MEMORY;
|
| +}
|
| +
|
| // static
|
| unsigned GLImageMemory::GetInternalFormatForTesting(gfx::BufferFormat format) {
|
| DCHECK(ValidFormat(format));
|
|
|