| 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 <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 glx_pixmap_ = 0; | 158 glx_pixmap_ = 0; |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 gfx::Size GLImageGLX::GetSize() { | 162 gfx::Size GLImageGLX::GetSize() { |
| 163 return size_; | 163 return size_; |
| 164 } | 164 } |
| 165 | 165 |
| 166 unsigned GLImageGLX::GetInternalFormat() { return internalformat_; } | 166 unsigned GLImageGLX::GetInternalFormat() { return internalformat_; } |
| 167 | 167 |
| 168 bool GLImageGLX::BindTexImage(unsigned target) { | 168 bool GLImageGLX::BindTexImage(unsigned target, GLFence* fence) { |
| 169 if (!glx_pixmap_) | 169 if (!glx_pixmap_) |
| 170 return false; | 170 return false; |
| 171 | 171 |
| 172 // Requires TEXTURE_2D target. | 172 // Requires TEXTURE_2D target. |
| 173 if (target != GL_TEXTURE_2D) | 173 if (target != GL_TEXTURE_2D) |
| 174 return false; | 174 return false; |
| 175 | 175 |
| 176 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0); | 176 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0); |
| 177 return true; | 177 return true; |
| 178 } | 178 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 202 return false; | 202 return false; |
| 203 } | 203 } |
| 204 | 204 |
| 205 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 205 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 206 uint64_t process_tracing_id, | 206 uint64_t process_tracing_id, |
| 207 const std::string& dump_name) { | 207 const std::string& dump_name) { |
| 208 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 | 208 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace gl | 211 } // namespace gl |
| OLD | NEW |