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

Unified Diff: ui/gl/gl_image_memory.h

Issue 536353002: gpu: Add CopyTexImage function to GLImage API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: ui/gl/gl_image_memory.h
diff --git a/ui/gl/gl_image_memory.h b/ui/gl/gl_image_memory.h
index 29ba7d8ef58a4111b44d22123483e2a6a9e07723..6dbec46bfe55ca894757ee296b756662021b0962 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -26,8 +26,9 @@ class GL_EXPORT GLImageMemory : public GLImage {
virtual gfx::Size GetSize() OVERRIDE;
virtual bool BindTexImage(unsigned target) OVERRIDE;
virtual void ReleaseTexImage(unsigned target) OVERRIDE {}
- virtual void WillUseTexImage() OVERRIDE {}
- virtual void DidUseTexImage() OVERRIDE {}
+ virtual bool CopyTexImage(unsigned target) OVERRIDE;
+ virtual void WillUseTexImage() OVERRIDE;
+ virtual void DidUseTexImage() OVERRIDE;
virtual void WillModifyTexImage() OVERRIDE {}
virtual void DidModifyTexImage() OVERRIDE {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
@@ -43,9 +44,14 @@ class GL_EXPORT GLImageMemory : public GLImage {
size_t Bytes() const;
private:
+ void DoBindTexImage(unsigned target);
+
const unsigned char* memory_;
const gfx::Size size_;
const unsigned internalformat_;
+ bool in_use_;
+ unsigned target_;
+ bool need_do_bind_tex_image_;
#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
defined(USE_OZONE)
unsigned egl_texture_id_;
« no previous file with comments | « ui/gl/gl_image_io_surface.cc ('k') | ui/gl/gl_image_memory.cc » ('j') | ui/gl/gl_image_memory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698