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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 347 } |
348 | 348 |
349 bool GLSurfaceAdapter::FlipsVertically() const { | 349 bool GLSurfaceAdapter::FlipsVertically() const { |
350 return surface_->FlipsVertically(); | 350 return surface_->FlipsVertically(); |
351 } | 351 } |
352 | 352 |
353 bool GLSurfaceAdapter::BuffersFlipped() const { | 353 bool GLSurfaceAdapter::BuffersFlipped() const { |
354 return surface_->BuffersFlipped(); | 354 return surface_->BuffersFlipped(); |
355 } | 355 } |
356 | 356 |
| 357 void GLSurfaceAdapter::OnSetSwapInterval(int interval) { |
| 358 surface_->OnSetSwapInterval(interval); |
| 359 } |
| 360 |
357 GLSurfaceAdapter::~GLSurfaceAdapter() {} | 361 GLSurfaceAdapter::~GLSurfaceAdapter() {} |
358 | 362 |
359 scoped_refptr<GLSurface> InitializeGLSurfaceWithFormat( | 363 scoped_refptr<GLSurface> InitializeGLSurfaceWithFormat( |
360 scoped_refptr<GLSurface> surface, GLSurfaceFormat format) { | 364 scoped_refptr<GLSurface> surface, GLSurfaceFormat format) { |
361 if (!surface->Initialize(format)) | 365 if (!surface->Initialize(format)) |
362 return nullptr; | 366 return nullptr; |
363 return surface; | 367 return surface; |
364 } | 368 } |
365 | 369 |
366 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { | 370 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { |
367 return InitializeGLSurfaceWithFormat(surface, GLSurfaceFormat()); | 371 return InitializeGLSurfaceWithFormat(surface, GLSurfaceFormat()); |
368 } | 372 } |
369 | 373 |
370 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; | 374 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; |
371 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = | 375 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = |
372 default; | 376 default; |
373 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; | 377 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; |
374 | 378 |
375 } // namespace gl | 379 } // namespace gl |
OLD | NEW |