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

Unified Diff: ui/gl/gl_image_memory.h

Issue 1403283007: Re-land: ui: Add custom stride support to GLImageMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more missing static_casts Created 5 years, 1 month 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/gfx/gpu_memory_buffer.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 3ce0440146d2ac53f26880ffa8244686063b0db1..5492ec391a2f95753f6d1cee6c2f14c2ecfcfe19 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -16,7 +16,9 @@ class GL_EXPORT GLImageMemory : public GLImage {
public:
GLImageMemory(const gfx::Size& size, unsigned internalformat);
- bool Initialize(const unsigned char* memory, gfx::BufferFormat format);
+ bool Initialize(const unsigned char* memory,
+ gfx::BufferFormat format,
+ size_t stride);
// Overridden from GLImage:
void Destroy(bool have_context) override;
@@ -40,12 +42,14 @@ class GL_EXPORT GLImageMemory : public GLImage {
~GLImageMemory() override;
gfx::BufferFormat format() const { return format_; }
+ size_t stride() const { return stride_; }
private:
const gfx::Size size_;
const unsigned internalformat_;
const unsigned char* memory_;
gfx::BufferFormat format_;
+ size_t stride_;
DISALLOW_COPY_AND_ASSIGN(GLImageMemory);
};
« no previous file with comments | « ui/gfx/gpu_memory_buffer.h ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698