| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "ui/gfx/gl/gl_surface.h" | 5 #include "ui/gfx/gl/gl_surface.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 { | 84 { |
| 85 return true; | 85 return true; |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool GLSurface::Resize(const gfx::Size& size) { | 88 bool GLSurface::Resize(const gfx::Size& size) { |
| 89 NOTIMPLEMENTED(); | 89 NOTIMPLEMENTED(); |
| 90 return false; | 90 return false; |
| 91 } | 91 } |
| 92 | 92 |
| 93 std::string GLSurface::GetExtensions() { | 93 std::string GLSurface::GetExtensions() { |
| 94 DCHECK_EQ(GetCurrent(), this); | 94 // Use of GLSurfaceAdapter class means that we can't compare |
| 95 // GetCurrent() and this directly. |
| 96 DCHECK_EQ(GetCurrent()->GetHandle(), GetHandle()); |
| 95 return std::string(""); | 97 return std::string(""); |
| 96 } | 98 } |
| 97 | 99 |
| 98 unsigned int GLSurface::GetBackingFrameBufferObject() { | 100 unsigned int GLSurface::GetBackingFrameBufferObject() { |
| 99 return 0; | 101 return 0; |
| 100 } | 102 } |
| 101 | 103 |
| 102 bool GLSurface::PostSubBuffer(int x, int y, int width, int height) { | 104 bool GLSurface::PostSubBuffer(int x, int y, int width, int height) { |
| 103 return false; | 105 return false; |
| 104 } | 106 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 159 } |
| 158 | 160 |
| 159 bool GLSurfaceAdapter::IsOffscreen() { | 161 bool GLSurfaceAdapter::IsOffscreen() { |
| 160 return surface_->IsOffscreen(); | 162 return surface_->IsOffscreen(); |
| 161 } | 163 } |
| 162 | 164 |
| 163 bool GLSurfaceAdapter::SwapBuffers() { | 165 bool GLSurfaceAdapter::SwapBuffers() { |
| 164 return surface_->SwapBuffers(); | 166 return surface_->SwapBuffers(); |
| 165 } | 167 } |
| 166 | 168 |
| 169 bool GLSurfaceAdapter::PostSubBuffer(int x, int y, int width, int height) { |
| 170 return surface_->PostSubBuffer(x, y, width, height); |
| 171 } |
| 172 |
| 173 std::string GLSurfaceAdapter::GetExtensions() { |
| 174 return surface_->GetExtensions(); |
| 175 } |
| 176 |
| 167 gfx::Size GLSurfaceAdapter::GetSize() { | 177 gfx::Size GLSurfaceAdapter::GetSize() { |
| 168 return surface_->GetSize(); | 178 return surface_->GetSize(); |
| 169 } | 179 } |
| 170 | 180 |
| 171 void* GLSurfaceAdapter::GetHandle() { | 181 void* GLSurfaceAdapter::GetHandle() { |
| 172 return surface_->GetHandle(); | 182 return surface_->GetHandle(); |
| 173 } | 183 } |
| 174 | 184 |
| 175 unsigned int GLSurfaceAdapter::GetBackingFrameBufferObject() { | 185 unsigned int GLSurfaceAdapter::GetBackingFrameBufferObject() { |
| 176 return surface_->GetBackingFrameBufferObject(); | 186 return surface_->GetBackingFrameBufferObject(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 190 | 200 |
| 191 void* GLSurfaceAdapter::GetConfig() { | 201 void* GLSurfaceAdapter::GetConfig() { |
| 192 return surface_->GetConfig(); | 202 return surface_->GetConfig(); |
| 193 } | 203 } |
| 194 | 204 |
| 195 unsigned GLSurfaceAdapter::GetFormat() { | 205 unsigned GLSurfaceAdapter::GetFormat() { |
| 196 return surface_->GetFormat(); | 206 return surface_->GetFormat(); |
| 197 } | 207 } |
| 198 | 208 |
| 199 } // namespace gfx | 209 } // namespace gfx |
| OLD | NEW |