Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: ui/gl/gl_image_memory.cc

Issue 2849963003: Allow putting NV12 software GMBs into overlays on windows (Closed)
Patch Set: post-review changes Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_image_memory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « ui/gl/gl_image_memory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698