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

Unified Diff: ui/gl/gl_image_memory.h

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.h ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_memory.h
diff --git a/ui/gl/gl_image_memory.h b/ui/gl/gl_image_memory.h
index 1569bcf768b5d4943b3e70d61a3956ce08653355..22b22e4e4e98cd69676df2f3f38df4793189f8de 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -24,6 +24,9 @@ class GL_EXPORT GLImageMemory : public GLImage {
gfx::BufferFormat format,
size_t stride);
+ // Safe downcast. Returns |nullptr| on failure.
+ static GLImageMemory* FromGLImage(GLImage* image);
+
// Overridden from GLImage:
gfx::Size GetSize() override;
unsigned GetInternalFormat() override;
@@ -39,15 +42,17 @@ class GL_EXPORT GLImageMemory : public GLImage {
const gfx::Rect& bounds_rect,
const gfx::RectF& crop_rect) override;
void Flush() override {}
+ Type GetType() const override;
static unsigned GetInternalFormatForTesting(gfx::BufferFormat format);
+ const unsigned char* memory() { return memory_; }
+ size_t stride() const { return stride_; }
+ gfx::BufferFormat format() const { return format_; }
+
protected:
~GLImageMemory() override;
- gfx::BufferFormat format() const { return format_; }
- size_t stride() const { return stride_; }
-
private:
const gfx::Size size_;
const unsigned internalformat_;
« no previous file with comments | « ui/gl/gl_image.h ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698