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

Unified Diff: ui/gl/gl_image_memory.cc

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 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
« no previous file with comments | « ui/gl/gl_image_memory.h ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_memory.cc
diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
index ca106b7cb2941bdb202e00c0632b40a1cb128a5e..13e9d71e3c9ed135f5d403b2b05d0a347b288411 100644
--- a/ui/gl/gl_image_memory.cc
+++ b/ui/gl/gl_image_memory.cc
@@ -7,12 +7,8 @@
#include "base/logging.h"
#include "base/trace_event/trace_event.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/scoped_binders.h"
-
-#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
- defined(USE_OZONE)
#include "ui/gl/gl_surface_egl.h"
-#endif
+#include "ui/gl/scoped_binders.h"
namespace gfx {
namespace {
@@ -128,22 +124,14 @@ GLImageMemory::GLImageMemory(const gfx::Size& size, unsigned internalformat)
format_(gfx::GpuMemoryBuffer::RGBA_8888),
in_use_(false),
target_(0),
- need_do_bind_tex_image_(false)
-#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
- defined(USE_OZONE)
- ,
+ need_do_bind_tex_image_(false),
egl_texture_id_(0u),
- egl_image_(EGL_NO_IMAGE_KHR)
-#endif
-{
+ egl_image_(EGL_NO_IMAGE_KHR) {
}
GLImageMemory::~GLImageMemory() {
-#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
- defined(USE_OZONE)
DCHECK_EQ(EGL_NO_IMAGE_KHR, egl_image_);
DCHECK_EQ(0u, egl_texture_id_);
-#endif
}
// static
@@ -205,8 +193,6 @@ bool GLImageMemory::Initialize(const unsigned char* memory,
}
void GLImageMemory::Destroy(bool have_context) {
-#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
- defined(USE_OZONE)
if (egl_image_ != EGL_NO_IMAGE_KHR) {
eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_);
egl_image_ = EGL_NO_IMAGE_KHR;
@@ -217,7 +203,6 @@ void GLImageMemory::Destroy(bool have_context) {
glDeleteTextures(1, &egl_texture_id_);
egl_texture_id_ = 0u;
}
-#endif
memory_ = NULL;
}
@@ -300,8 +285,6 @@ void GLImageMemory::DoBindTexImage(unsigned target) {
need_do_bind_tex_image_ = false;
DCHECK(memory_);
-#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
- defined(USE_OZONE)
if (target == GL_TEXTURE_EXTERNAL_OES) {
if (egl_image_ == EGL_NO_IMAGE_KHR) {
DCHECK_EQ(0u, egl_texture_id_);
@@ -373,7 +356,6 @@ void GLImageMemory::DoBindTexImage(unsigned target) {
DCHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
return;
}
-#endif
DCHECK_NE(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), target);
if (IsCompressedFormat(format_)) {
« no previous file with comments | « ui/gl/gl_image_memory.h ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698