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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 bool GLSurface::Recreate() { | 45 bool GLSurface::Recreate() { |
46 NOTIMPLEMENTED(); | 46 NOTIMPLEMENTED(); |
47 return false; | 47 return false; |
48 } | 48 } |
49 | 49 |
50 bool GLSurface::DeferDraws() { | 50 bool GLSurface::DeferDraws() { |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
| 54 bool GLSurface::SupportsSwapBuffersWithDamage() { |
| 55 return false; |
| 56 } |
| 57 |
54 bool GLSurface::SupportsPostSubBuffer() { | 58 bool GLSurface::SupportsPostSubBuffer() { |
55 return false; | 59 return false; |
56 } | 60 } |
57 | 61 |
58 bool GLSurface::SupportsCommitOverlayPlanes() { | 62 bool GLSurface::SupportsCommitOverlayPlanes() { |
59 return false; | 63 return false; |
60 } | 64 } |
61 | 65 |
62 bool GLSurface::SupportsAsyncSwap() { | 66 bool GLSurface::SupportsAsyncSwap() { |
63 return false; | 67 return false; |
64 } | 68 } |
65 | 69 |
66 unsigned int GLSurface::GetBackingFramebufferObject() { | 70 unsigned int GLSurface::GetBackingFramebufferObject() { |
67 return 0; | 71 return 0; |
68 } | 72 } |
69 | 73 |
70 void GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { | 74 void GLSurface::SwapBuffersAsync(const SwapCompletionCallback& callback) { |
71 NOTREACHED(); | 75 NOTREACHED(); |
72 } | 76 } |
73 | 77 |
| 78 gfx::SwapResult GLSurface::SwapBuffersWithDamage(int x, |
| 79 int y, |
| 80 int width, |
| 81 int height) { |
| 82 return gfx::SwapResult::SWAP_FAILED; |
| 83 } |
| 84 |
74 gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) { | 85 gfx::SwapResult GLSurface::PostSubBuffer(int x, int y, int width, int height) { |
75 return gfx::SwapResult::SWAP_FAILED; | 86 return gfx::SwapResult::SWAP_FAILED; |
76 } | 87 } |
77 | 88 |
78 void GLSurface::PostSubBufferAsync(int x, | 89 void GLSurface::PostSubBufferAsync(int x, |
79 int y, | 90 int y, |
80 int width, | 91 int width, |
81 int height, | 92 int height, |
82 const SwapCompletionCallback& callback) { | 93 const SwapCompletionCallback& callback) { |
83 NOTREACHED(); | 94 NOTREACHED(); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 229 |
219 gfx::SwapResult GLSurfaceAdapter::SwapBuffers() { | 230 gfx::SwapResult GLSurfaceAdapter::SwapBuffers() { |
220 return surface_->SwapBuffers(); | 231 return surface_->SwapBuffers(); |
221 } | 232 } |
222 | 233 |
223 void GLSurfaceAdapter::SwapBuffersAsync( | 234 void GLSurfaceAdapter::SwapBuffersAsync( |
224 const SwapCompletionCallback& callback) { | 235 const SwapCompletionCallback& callback) { |
225 surface_->SwapBuffersAsync(callback); | 236 surface_->SwapBuffersAsync(callback); |
226 } | 237 } |
227 | 238 |
| 239 gfx::SwapResult GLSurfaceAdapter::SwapBuffersWithDamage(int x, |
| 240 int y, |
| 241 int width, |
| 242 int height) { |
| 243 return surface_->SwapBuffersWithDamage(x, y, width, height); |
| 244 } |
| 245 |
228 gfx::SwapResult GLSurfaceAdapter::PostSubBuffer(int x, | 246 gfx::SwapResult GLSurfaceAdapter::PostSubBuffer(int x, |
229 int y, | 247 int y, |
230 int width, | 248 int width, |
231 int height) { | 249 int height) { |
232 return surface_->PostSubBuffer(x, y, width, height); | 250 return surface_->PostSubBuffer(x, y, width, height); |
233 } | 251 } |
234 | 252 |
235 void GLSurfaceAdapter::PostSubBufferAsync( | 253 void GLSurfaceAdapter::PostSubBufferAsync( |
236 int x, | 254 int x, |
237 int y, | 255 int y, |
238 int width, | 256 int width, |
239 int height, | 257 int height, |
240 const SwapCompletionCallback& callback) { | 258 const SwapCompletionCallback& callback) { |
241 surface_->PostSubBufferAsync(x, y, width, height, callback); | 259 surface_->PostSubBufferAsync(x, y, width, height, callback); |
242 } | 260 } |
243 | 261 |
244 gfx::SwapResult GLSurfaceAdapter::CommitOverlayPlanes() { | 262 gfx::SwapResult GLSurfaceAdapter::CommitOverlayPlanes() { |
245 return surface_->CommitOverlayPlanes(); | 263 return surface_->CommitOverlayPlanes(); |
246 } | 264 } |
247 | 265 |
248 void GLSurfaceAdapter::CommitOverlayPlanesAsync( | 266 void GLSurfaceAdapter::CommitOverlayPlanesAsync( |
249 const SwapCompletionCallback& callback) { | 267 const SwapCompletionCallback& callback) { |
250 surface_->CommitOverlayPlanesAsync(callback); | 268 surface_->CommitOverlayPlanesAsync(callback); |
251 } | 269 } |
252 | 270 |
| 271 bool GLSurfaceAdapter::SupportsSwapBuffersWithDamage() { |
| 272 return surface_->SupportsSwapBuffersWithDamage(); |
| 273 } |
| 274 |
253 bool GLSurfaceAdapter::SupportsPostSubBuffer() { | 275 bool GLSurfaceAdapter::SupportsPostSubBuffer() { |
254 return surface_->SupportsPostSubBuffer(); | 276 return surface_->SupportsPostSubBuffer(); |
255 } | 277 } |
256 | 278 |
257 bool GLSurfaceAdapter::SupportsCommitOverlayPlanes() { | 279 bool GLSurfaceAdapter::SupportsCommitOverlayPlanes() { |
258 return surface_->SupportsCommitOverlayPlanes(); | 280 return surface_->SupportsCommitOverlayPlanes(); |
259 } | 281 } |
260 | 282 |
261 bool GLSurfaceAdapter::SupportsAsyncSwap() { | 283 bool GLSurfaceAdapter::SupportsAsyncSwap() { |
262 return surface_->SupportsAsyncSwap(); | 284 return surface_->SupportsAsyncSwap(); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 return nullptr; | 356 return nullptr; |
335 return surface; | 357 return surface; |
336 } | 358 } |
337 | 359 |
338 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; | 360 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; |
339 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = | 361 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = |
340 default; | 362 default; |
341 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; | 363 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; |
342 | 364 |
343 } // namespace gl | 365 } // namespace gl |
OLD | NEW |