| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 extern "C" { | 5 extern "C" { |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 } | 7 } |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 void GLImageGLX::Destroy(bool have_context) { | 162 void GLImageGLX::Destroy(bool have_context) { |
| 163 if (glx_pixmap_) { | 163 if (glx_pixmap_) { |
| 164 glXDestroyGLXPixmap(gfx::GetXDisplay(), glx_pixmap_); | 164 glXDestroyGLXPixmap(gfx::GetXDisplay(), glx_pixmap_); |
| 165 glx_pixmap_ = 0; | 165 glx_pixmap_ = 0; |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 gfx::Size GLImageGLX::GetSize() { return size_; } | 169 gfx::Size GLImageGLX::GetSize() { return size_; } |
| 170 | 170 |
| 171 unsigned GLImageGLX::GetInternalFormat() { return internalformat_; } |
| 172 |
| 171 bool GLImageGLX::BindTexImage(unsigned target) { | 173 bool GLImageGLX::BindTexImage(unsigned target) { |
| 172 if (!glx_pixmap_) | 174 if (!glx_pixmap_) |
| 173 return false; | 175 return false; |
| 174 | 176 |
| 175 // Requires TEXTURE_2D target. | 177 // Requires TEXTURE_2D target. |
| 176 if (target != GL_TEXTURE_2D) | 178 if (target != GL_TEXTURE_2D) |
| 177 return false; | 179 return false; |
| 178 | 180 |
| 179 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0); | 181 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0); |
| 180 return true; | 182 return true; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 193 | 195 |
| 194 bool GLImageGLX::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 196 bool GLImageGLX::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 195 int z_order, | 197 int z_order, |
| 196 OverlayTransform transform, | 198 OverlayTransform transform, |
| 197 const Rect& bounds_rect, | 199 const Rect& bounds_rect, |
| 198 const RectF& crop_rect) { | 200 const RectF& crop_rect) { |
| 199 return false; | 201 return false; |
| 200 } | 202 } |
| 201 | 203 |
| 202 } // namespace gfx | 204 } // namespace gfx |
| OLD | NEW |