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

Unified Diff: ui/gl/gl_image_surface_texture.h

Issue 177953004: Enable SurfaceTexture based zero-copy texture uploading on Android platform Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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_surface_texture.h
diff --git a/ui/gl/gl_image_egl.h b/ui/gl/gl_image_surface_texture.h
similarity index 59%
copy from ui/gl/gl_image_egl.h
copy to ui/gl/gl_image_surface_texture.h
index 31dd008059affccbeb503179540cb2cbd0155101..183052a4d23982eb9ead7b7a471e712bf59299ce 100644
--- a/ui/gl/gl_image_egl.h
+++ b/ui/gl/gl_image_surface_texture.h
@@ -1,18 +1,19 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_GL_GL_IMAGE_EGL_H_
-#define UI_GL_GL_IMAGE_EGL_H_
+#ifndef UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_
+#define UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_
+#include "ui/gl/android/surface_texture.h"
#include "ui/gl/gl_bindings.h" // for EGLImageKHR
#include "ui/gl/gl_image.h"
namespace gfx {
-class GL_EXPORT GLImageEGL : public GLImage {
+class GL_EXPORT GLImageSurfaceTexture : public GLImage {
public:
- explicit GLImageEGL(gfx::Size size);
+ explicit GLImageSurfaceTexture(gfx::Size size);
bool Initialize(gfx::GpuMemoryBufferHandle buffer);
@@ -26,18 +27,19 @@ class GL_EXPORT GLImageEGL : public GLImage {
virtual void SetReleaseAfterUse() OVERRIDE;
protected:
- virtual ~GLImageEGL();
+ virtual ~GLImageSurfaceTexture();
private:
- EGLImageKHR egl_image_;
gfx::Size size_;
bool release_after_use_;
bool in_use_;
unsigned target_;
+ scoped_refptr<gfx::SurfaceTexture> surface_texture_;
+ unsigned int texture_id_;
- DISALLOW_COPY_AND_ASSIGN(GLImageEGL);
+ DISALLOW_COPY_AND_ASSIGN(GLImageSurfaceTexture);
};
} // namespace gfx
-#endif // UI_GL_GL_IMAGE_EGL_H_
+#endif // UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_

Powered by Google App Engine
This is Rietveld 408576698