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

Unified Diff: ui/gl/gl_image_memory.h

Issue 1401423003: Re-land: ui: Move GLImage::BindTexImage fallback from GLImage implementations to GLES2CmdDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix stream texture issue Created 5 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_io_surface.mm ('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 10b1a3bc60b911ff5d51d4f4ed72569676961368..4f1fe045920bdb68769b4b31057237e6c9f0cf7b 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -7,14 +7,8 @@
#include "ui/gl/gl_image.h"
-#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
- defined(USE_OZONE)
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#endif
-
#include "base/numerics/safe_math.h"
-#include "ui/gfx/gpu_memory_buffer.h"
+#include "ui/gfx/buffer_types.h"
namespace gfx {
@@ -34,45 +28,26 @@ class GL_EXPORT GLImageMemory : public GLImage {
unsigned GetInternalFormat() override;
bool BindTexImage(unsigned target) override;
void ReleaseTexImage(unsigned target) override {}
+ bool CopyTexImage(unsigned target) override;
bool CopyTexSubImage(unsigned target,
const Point& offset,
const Rect& rect) override;
- void WillUseTexImage() override;
- void DidUseTexImage() override;
- void WillModifyTexImage() override {}
- void DidModifyTexImage() override {}
bool ScheduleOverlayPlane(AcceleratedWidget widget,
int z_order,
OverlayTransform transform,
const Rect& bounds_rect,
const RectF& crop_rect) override;
- // Only dumps the GLTexture portion of the memory usage. Subclasses are
- // responsible for dumping the CPU-side memory.
- void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
- uint64_t process_tracing_id,
- const std::string& dump_name) override;
-
protected:
~GLImageMemory() override;
BufferFormat format() const { return format_; }
private:
- void DoBindTexImage(unsigned target);
-
const Size size_;
const unsigned internalformat_;
const unsigned char* memory_;
BufferFormat format_;
- 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_;
- EGLImageKHR egl_image_;
-#endif
DISALLOW_COPY_AND_ASSIGN(GLImageMemory);
};
« no previous file with comments | « ui/gl/gl_image_io_surface.mm ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698