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

Unified Diff: ui/gl/gl_image_android_native_buffer.h

Issue 212933009: ui: Refactor GLImageEGL for usage by targets other than EGL_NATIVE_BUFFER_ANDROID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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_android_native_buffer.h
diff --git a/ui/gl/gl_image_egl.h b/ui/gl/gl_image_android_native_buffer.h
similarity index 50%
copy from ui/gl/gl_image_egl.h
copy to ui/gl/gl_image_android_native_buffer.h
index fcb49c4232ae125c944633e9b31461384222bb3c..ccd023fad6da146806d52817b09c6d3280c30e5c 100644
--- a/ui/gl/gl_image_egl.h
+++ b/ui/gl/gl_image_android_native_buffer.h
@@ -1,47 +1,40 @@
-// 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_ANDROID_NATIVE_BUFFER_H_
+#define UI_GL_GL_IMAGE_ANDROID_NATIVE_BUFFER_H_
-#include "ui/gl/gl_bindings.h" // for EGLImageKHR
-#include "ui/gl/gl_image.h"
+#include "ui/gl/gl_image_egl.h"
namespace gfx {
-class GL_EXPORT GLImageEGL : public GLImage {
+class GL_EXPORT GLImageAndroidNativeBuffer : public GLImageEGL {
public:
- explicit GLImageEGL(gfx::Size size);
+ explicit GLImageAndroidNativeBuffer(gfx::Size size);
bool Initialize(gfx::GpuMemoryBufferHandle buffer);
// Overridden from GLImage:
virtual void Destroy() OVERRIDE;
- 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 void WillModifyTexImage() OVERRIDE {}
- virtual void DidModifyTexImage() OVERRIDE {}
virtual void SetReleaseAfterUse() OVERRIDE;
protected:
- virtual ~GLImageEGL();
+ virtual ~GLImageAndroidNativeBuffer();
private:
- EGLImageKHR egl_image_;
- gfx::Size size_;
bool release_after_use_;
bool in_use_;
unsigned target_;
EGLImageKHR egl_image_for_unbind_;
GLuint texture_id_for_unbind_;
- DISALLOW_COPY_AND_ASSIGN(GLImageEGL);
+ DISALLOW_COPY_AND_ASSIGN(GLImageAndroidNativeBuffer);
};
} // namespace gfx
-#endif // UI_GL_GL_IMAGE_EGL_H_
+#endif // UI_GL_GL_IMAGE_ANDROID_NATIVE_BUFFER_H_

Powered by Google App Engine
This is Rietveld 408576698