| 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 #include "ui/gl/gl_surface.h" | 5 #include "ui/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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool GLSurface::DeferDraws() { | 112 bool GLSurface::DeferDraws() { |
| 113 return false; | 113 return false; |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool GLSurface::SupportsPostSubBuffer() { | 116 bool GLSurface::SupportsPostSubBuffer() { |
| 117 return false; | 117 return false; |
| 118 } | 118 } |
| 119 | 119 |
| 120 bool GLSurface::SupportsCommitOverlayPlanes() { |
| 121 return false; |
| 122 } |
| 123 |
| 120 bool GLSurface::SupportsAsyncSwap() { | 124 bool GLSurface::SupportsAsyncSwap() { |
| 121 return false; | 125 return false; |
| 122 } | 126 } |
| 123 | 127 |
| 124 unsigned int GLSurface::GetBackingFrameBufferObject() { | 128 unsigned int GLSurface::GetBackingFrameBufferObject() { |
| 125 return 0; | 129 return 0; |
| 126 } | 130 } |
| 127 | 131 |
| 128 void GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { | 132 void GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { |
| 129 NOTREACHED(); | 133 NOTREACHED(); |
| 130 } | 134 } |
| 131 | 135 |
| 132 gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) { | 136 gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) { |
| 133 return gfx::SwapResult::SWAP_FAILED; | 137 return gfx::SwapResult::SWAP_FAILED; |
| 134 } | 138 } |
| 135 | 139 |
| 136 void GLSurface::PostSubBufferAsync(int x, | 140 void GLSurface::PostSubBufferAsync(int x, |
| 137 int y, | 141 int y, |
| 138 int width, | 142 int width, |
| 139 int height, | 143 int height, |
| 140 const SwapCompletionCallback& callback) { | 144 const SwapCompletionCallback& callback) { |
| 141 NOTREACHED(); | 145 NOTREACHED(); |
| 142 } | 146 } |
| 143 | 147 |
| 148 gfx::SwapResult GLSurface::CommitOverlayPlanes() { |
| 149 NOTREACHED(); |
| 150 return gfx::SwapResult::SWAP_FAILED; |
| 151 } |
| 152 |
| 153 void GLSurface::CommitOverlayPlanesAsync( |
| 154 const SwapCompletionCallback& callback) { |
| 155 NOTREACHED(); |
| 156 } |
| 157 |
| 144 bool GLSurface::OnMakeCurrent(GLContext* context) { | 158 bool GLSurface::OnMakeCurrent(GLContext* context) { |
| 145 return true; | 159 return true; |
| 146 } | 160 } |
| 147 | 161 |
| 148 void GLSurface::NotifyWasBound() { | 162 void GLSurface::NotifyWasBound() { |
| 149 } | 163 } |
| 150 | 164 |
| 151 bool GLSurface::SetBackbufferAllocation(bool allocated) { | 165 bool GLSurface::SetBackbufferAllocation(bool allocated) { |
| 152 return true; | 166 return true; |
| 153 } | 167 } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 289 |
| 276 void GLSurfaceAdapter::PostSubBufferAsync( | 290 void GLSurfaceAdapter::PostSubBufferAsync( |
| 277 int x, | 291 int x, |
| 278 int y, | 292 int y, |
| 279 int width, | 293 int width, |
| 280 int height, | 294 int height, |
| 281 const SwapCompletionCallback& callback) { | 295 const SwapCompletionCallback& callback) { |
| 282 surface_->PostSubBufferAsync(x, y, width, height, callback); | 296 surface_->PostSubBufferAsync(x, y, width, height, callback); |
| 283 } | 297 } |
| 284 | 298 |
| 299 gfx::SwapResult GLSurfaceAdapter::CommitOverlayPlanes() { |
| 300 return surface_->CommitOverlayPlanes(); |
| 301 } |
| 302 |
| 303 void GLSurfaceAdapter::CommitOverlayPlanesAsync( |
| 304 const SwapCompletionCallback& callback) { |
| 305 surface_->CommitOverlayPlanesAsync(callback); |
| 306 } |
| 307 |
| 285 bool GLSurfaceAdapter::SupportsPostSubBuffer() { | 308 bool GLSurfaceAdapter::SupportsPostSubBuffer() { |
| 286 return surface_->SupportsPostSubBuffer(); | 309 return surface_->SupportsPostSubBuffer(); |
| 287 } | 310 } |
| 288 | 311 |
| 312 bool GLSurfaceAdapter::SupportsCommitOverlayPlanes() { |
| 313 return surface_->SupportsCommitOverlayPlanes(); |
| 314 } |
| 315 |
| 289 bool GLSurfaceAdapter::SupportsAsyncSwap() { | 316 bool GLSurfaceAdapter::SupportsAsyncSwap() { |
| 290 return surface_->SupportsAsyncSwap(); | 317 return surface_->SupportsAsyncSwap(); |
| 291 } | 318 } |
| 292 | 319 |
| 293 gfx::Size GLSurfaceAdapter::GetSize() { | 320 gfx::Size GLSurfaceAdapter::GetSize() { |
| 294 return surface_->GetSize(); | 321 return surface_->GetSize(); |
| 295 } | 322 } |
| 296 | 323 |
| 297 void* GLSurfaceAdapter::GetHandle() { | 324 void* GLSurfaceAdapter::GetHandle() { |
| 298 return surface_->GetHandle(); | 325 return surface_->GetHandle(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 z_order, transform, image, bounds_rect, crop_rect); | 370 z_order, transform, image, bounds_rect, crop_rect); |
| 344 } | 371 } |
| 345 | 372 |
| 346 bool GLSurfaceAdapter::IsSurfaceless() const { | 373 bool GLSurfaceAdapter::IsSurfaceless() const { |
| 347 return surface_->IsSurfaceless(); | 374 return surface_->IsSurfaceless(); |
| 348 } | 375 } |
| 349 | 376 |
| 350 GLSurfaceAdapter::~GLSurfaceAdapter() {} | 377 GLSurfaceAdapter::~GLSurfaceAdapter() {} |
| 351 | 378 |
| 352 } // namespace gfx | 379 } // namespace gfx |
| OLD | NEW |