| 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" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 13 #include "base/threading/thread_local.h" | 13 #include "base/threading/thread_local.h" |
| 14 #include "base/trace_event/trace_event.h" | 14 #include "base/trace_event/trace_event.h" |
| 15 #include "ui/gfx/swap_result.h" | 15 #include "ui/gfx/swap_result.h" |
| 16 #include "ui/gl/gl_context.h" | 16 #include "ui/gl/gl_context.h" |
| 17 #include "ui/gl/gl_image.h" | 17 #include "ui/gl/gl_image.h" |
| 18 #include "ui/gl/gl_implementation.h" | 18 #include "ui/gl/gl_implementation.h" |
| 19 #include "ui/gl/gl_surface_format.h" | 19 #include "ui/gl/gl_surface_format.h" |
| 20 #include "ui/gl/gl_switches.h" | 20 #include "ui/gl/gl_switches.h" |
| 21 | 21 |
| 22 namespace gl { | 22 namespace gl { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leaky | 25 base::LazyInstance<base::ThreadLocalPointer<GLSurface>>::Leaky |
| 26 current_surface_ = LAZY_INSTANCE_INITIALIZER; | 26 current_surface_ = LAZY_INSTANCE_INITIALIZER; |
| 27 } // namespace | 27 } // namespace |
| 28 | 28 |
| 29 GLSurface::GLSurface() {} | 29 GLSurface::GLSurface() {} |
| 30 | 30 |
| 31 bool GLSurface::Initialize() { | 31 bool GLSurface::Initialize() { |
| 32 return Initialize(GLSurfaceFormat()); | 32 return Initialize(GLSurfaceFormat()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 bool GLSurface::Initialize(GLSurfaceFormat format) { | 35 bool GLSurface::Initialize(GLSurfaceFormat format) { |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { | 381 scoped_refptr<GLSurface> InitializeGLSurface(scoped_refptr<GLSurface> surface) { |
| 382 return InitializeGLSurfaceWithFormat(surface, GLSurfaceFormat()); | 382 return InitializeGLSurfaceWithFormat(surface, GLSurfaceFormat()); |
| 383 } | 383 } |
| 384 | 384 |
| 385 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; | 385 GLSurface::CALayerInUseQuery::CALayerInUseQuery() = default; |
| 386 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = | 386 GLSurface::CALayerInUseQuery::CALayerInUseQuery(const CALayerInUseQuery&) = |
| 387 default; | 387 default; |
| 388 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; | 388 GLSurface::CALayerInUseQuery::~CALayerInUseQuery() = default; |
| 389 | 389 |
| 390 } // namespace gl | 390 } // namespace gl |
| OLD | NEW |