| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 bool GLSurface::Recreate() { | 46 bool GLSurface::Recreate() { |
| 47 NOTIMPLEMENTED(); | 47 NOTIMPLEMENTED(); |
| 48 return false; | 48 return false; |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool GLSurface::DeferDraws() { | 51 bool GLSurface::DeferDraws() { |
| 52 return false; | 52 return false; |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool GLSurface::SupportsSwapBuffersWithDamage() { | 55 bool GLSurface::SupportsSwapBuffersWithBounds() { |
| 56 return false; | 56 return false; |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool GLSurface::SupportsPostSubBuffer() { | 59 bool GLSurface::SupportsPostSubBuffer() { |
| 60 return false; | 60 return false; |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool GLSurface::SupportsCommitOverlayPlanes() { | 63 bool GLSurface::SupportsCommitOverlayPlanes() { |
| 64 return false; | 64 return false; |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool GLSurface::SupportsAsyncSwap() { | 67 bool GLSurface::SupportsAsyncSwap() { |
| 68 return false; | 68 return false; |
| 69 } | 69 } |
| 70 | 70 |
| 71 unsigned int GLSurface::GetBackingFramebufferObject() { | 71 unsigned int GLSurface::GetBackingFramebufferObject() { |
| 72 return 0; | 72 return 0; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { | 75 void GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { |
| 76 NOTREACHED(); | 76 NOTREACHED(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 gfx::SwapResult GLSurface::SwapBuffersWithDamage(int x, | 79 gfx::SwapResult GLSurface::SwapBuffersWithBounds( |
| 80 int y, | 80 const std::vector<gfx::Rect>& rects) { |
| 81 int width, | |
| 82 int height) { | |
| 83 return gfx::SwapResult::SWAP_FAILED; | 81 return gfx::SwapResult::SWAP_FAILED; |
| 84 } | 82 } |
| 85 | 83 |
| 86 gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) { | 84 gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) { |
| 87 return gfx::SwapResult::SWAP_FAILED; | 85 return gfx::SwapResult::SWAP_FAILED; |
| 88 } | 86 } |
| 89 | 87 |
| 90 void GLSurface::PostSubBufferAsync(int x, | 88 void GLSurface::PostSubBufferAsync(int x, |
| 91 int y, | 89 int y, |
| 92 int width, | 90 int width, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 232 |
| 235 gfx::SwapResult GLSurfaceAdapter::SwapBuffers() { | 233 gfx::SwapResult GLSurfaceAdapter::SwapBuffers() { |
| 236 return surface_->SwapBuffers(); | 234 return surface_->SwapBuffers(); |
| 237 } | 235 } |
| 238 | 236 |
| 239 void GLSurfaceAdapter::SwapBuffersAsync( | 237 void GLSurfaceAdapter::SwapBuffersAsync( |
| 240 const SwapCompletionCallback& callback) { | 238 const SwapCompletionCallback& callback) { |
| 241 surface_->SwapBuffersAsync(callback); | 239 surface_->SwapBuffersAsync(callback); |
| 242 } | 240 } |
| 243 | 241 |
| 244 gfx::SwapResult GLSurfaceAdapter::SwapBuffersWithDamage(int x, | 242 gfx::SwapResult GLSurfaceAdapter::SwapBuffersWithBounds( |
| 245 int y, | 243 const std::vector<gfx::Rect>& rects) { |
| 246 int width, | 244 return surface_->SwapBuffersWithBounds(rects); |
| 247 int height) { | |
| 248 return surface_->SwapBuffersWithDamage(x, y, width, height); | |
| 249 } | 245 } |
| 250 | 246 |
| 251 gfx::SwapResult GLSurfaceAdapter::PostSubBuffer(int x, | 247 gfx::SwapResult GLSurfaceAdapter::PostSubBuffer(int x, |
| 252 int y, | 248 int y, |
| 253 int width, | 249 int width, |
| 254 int height) { | 250 int height) { |
| 255 return surface_->PostSubBuffer(x, y, width, height); | 251 return surface_->PostSubBuffer(x, y, width, height); |
| 256 } | 252 } |
| 257 | 253 |
| 258 void GLSurfaceAdapter::PostSubBufferAsync( | 254 void GLSurfaceAdapter::PostSubBufferAsync( |
| 259 int x, | 255 int x, |
| 260 int y, | 256 int y, |
| 261 int width, | 257 int width, |
| 262 int height, | 258 int height, |
| 263 const SwapCompletionCallback& callback) { | 259 const SwapCompletionCallback& callback) { |
| 264 surface_->PostSubBufferAsync(x, y, width, height, callback); | 260 surface_->PostSubBufferAsync(x, y, width, height, callback); |
| 265 } | 261 } |
| 266 | 262 |
| 267 gfx::SwapResult GLSurfaceAdapter::CommitOverlayPlanes() { | 263 gfx::SwapResult GLSurfaceAdapter::CommitOverlayPlanes() { |
| 268 return surface_->CommitOverlayPlanes(); | 264 return surface_->CommitOverlayPlanes(); |
| 269 } | 265 } |
| 270 | 266 |
| 271 void GLSurfaceAdapter::CommitOverlayPlanesAsync( | 267 void GLSurfaceAdapter::CommitOverlayPlanesAsync( |
| 272 const SwapCompletionCallback& callback) { | 268 const SwapCompletionCallback& callback) { |
| 273 surface_->CommitOverlayPlanesAsync(callback); | 269 surface_->CommitOverlayPlanesAsync(callback); |
| 274 } | 270 } |
| 275 | 271 |
| 276 bool GLSurfaceAdapter::SupportsSwapBuffersWithDamage() { | 272 bool GLSurfaceAdapter::SupportsSwapBuffersWithBounds() { |
| 277 return surface_->SupportsSwapBuffersWithDamage(); | 273 return surface_->SupportsSwapBuffersWithBounds(); |
| 278 } | 274 } |
| 279 | 275 |
| 280 bool GLSurfaceAdapter::SupportsPostSubBuffer() { | 276 bool GLSurfaceAdapter::SupportsPostSubBuffer() { |
| 281 return surface_->SupportsPostSubBuffer(); | 277 return surface_->SupportsPostSubBuffer(); |
| 282 } | 278 } |
| 283 | 279 |
| 284 bool GLSurfaceAdapter::SupportsCommitOverlayPlanes() { | 280 bool GLSurfaceAdapter::SupportsCommitOverlayPlanes() { |
| 285 return surface_->SupportsCommitOverlayPlanes(); | 281 return surface_->SupportsCommitOverlayPlanes(); |
| 286 } | 282 } |
| 287 | 283 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { | 366 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { |
| 371 return InitializeGLSurfaceWithFormat(surface, GLSurfaceFormat()); | 367 return InitializeGLSurfaceWithFormat(surface, GLSurfaceFormat()); |
| 372 } | 368 } |
| 373 | 369 |
| 374 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; | 370 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; |
| 375 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = | 371 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = |
| 376 default; | 372 default; |
| 377 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; | 373 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; |
| 378 | 374 |
| 379 } // namespace gl | 375 } // namespace gl |
| OLD | NEW |