| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 std::string delimited_name(name); | 197 std::string delimited_name(name); |
| 198 delimited_name += " "; | 198 delimited_name += " "; |
| 199 | 199 |
| 200 return extensions.find(delimited_name) != std::string::npos; | 200 return extensions.find(delimited_name) != std::string::npos; |
| 201 } | 201 } |
| 202 | 202 |
| 203 void GLSurface::OnSetSwapInterval(int interval) { | 203 void GLSurface::OnSetSwapInterval(int interval) { |
| 204 } | 204 } |
| 205 | 205 |
| 206 bool GLSurface::SupportsInsertFence() { |
| 207 return false; |
| 208 } |
| 209 |
| 210 void GLSurface::InsertFence(const base::Closure& callback) { |
| 211 NOTREACHED(); |
| 212 } |
| 213 |
| 206 GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {} | 214 GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {} |
| 207 | 215 |
| 208 bool GLSurfaceAdapter::Initialize(GLSurface::Format format) { | 216 bool GLSurfaceAdapter::Initialize(GLSurface::Format format) { |
| 209 return surface_->Initialize(format); | 217 return surface_->Initialize(format); |
| 210 } | 218 } |
| 211 | 219 |
| 212 void GLSurfaceAdapter::Destroy() { | 220 void GLSurfaceAdapter::Destroy() { |
| 213 surface_->Destroy(); | 221 surface_->Destroy(); |
| 214 } | 222 } |
| 215 | 223 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 358 } |
| 351 | 359 |
| 352 bool GLSurfaceAdapter::FlipsVertically() const { | 360 bool GLSurfaceAdapter::FlipsVertically() const { |
| 353 return surface_->FlipsVertically(); | 361 return surface_->FlipsVertically(); |
| 354 } | 362 } |
| 355 | 363 |
| 356 bool GLSurfaceAdapter::BuffersFlipped() const { | 364 bool GLSurfaceAdapter::BuffersFlipped() const { |
| 357 return surface_->BuffersFlipped(); | 365 return surface_->BuffersFlipped(); |
| 358 } | 366 } |
| 359 | 367 |
| 368 bool GLSurfaceAdapter::SupportsInsertFence() { |
| 369 return surface_->SupportsInsertFence(); |
| 370 } |
| 371 |
| 372 void GLSurfaceAdapter::InsertFence(const base::Closure& callback) { |
| 373 return surface_->InsertFence(callback); |
| 374 } |
| 375 |
| 360 GLSurfaceAdapter::~GLSurfaceAdapter() {} | 376 GLSurfaceAdapter::~GLSurfaceAdapter() {} |
| 361 | 377 |
| 362 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { | 378 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { |
| 363 if (!surface->Initialize()) | 379 if (!surface->Initialize()) |
| 364 return nullptr; | 380 return nullptr; |
| 365 return surface; | 381 return surface; |
| 366 } | 382 } |
| 367 | 383 |
| 368 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; | 384 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; |
| 369 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = | 385 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = |
| 370 default; | 386 default; |
| 371 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; | 387 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; |
| 372 | 388 |
| 373 } // namespace gl | 389 } // namespace gl |
| OLD | NEW |