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

Unified Diff: ui/gl/gl_image_memory.h

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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_glx.cc ('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 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_;
« no previous file with comments | « ui/gl/gl_image_glx.cc ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698