| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.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_implementation.h" | 17 #include "ui/gl/gl_implementation.h" |
| 18 #include "ui/gl/gl_switches.h" | 18 #include "ui/gl/gl_switches.h" |
| 19 | 19 |
| 20 #if defined(USE_X11) | |
| 21 #include <X11/Xlib.h> | |
| 22 #endif | |
| 23 | |
| 24 namespace gfx { | 20 namespace gfx { |
| 25 | 21 |
| 26 namespace { | 22 namespace { |
| 27 base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leaky | 23 base::LazyInstance<base::ThreadLocalPointer<GLSurface> >::Leaky |
| 28 current_surface_ = LAZY_INSTANCE_INITIALIZER; | 24 current_surface_ = LAZY_INSTANCE_INITIALIZER; |
| 29 } // namespace | 25 } // namespace |
| 30 | 26 |
| 31 // static | 27 // static |
| 32 bool GLSurface::InitializeOneOff() { | 28 bool GLSurface::InitializeOneOff() { |
| 33 DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); | 29 DCHECK_EQ(kGLImplementationNone, GetGLImplementation()); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 z_order, transform, image, bounds_rect, crop_rect); | 331 z_order, transform, image, bounds_rect, crop_rect); |
| 336 } | 332 } |
| 337 | 333 |
| 338 bool GLSurfaceAdapter::IsSurfaceless() const { | 334 bool GLSurfaceAdapter::IsSurfaceless() const { |
| 339 return surface_->IsSurfaceless(); | 335 return surface_->IsSurfaceless(); |
| 340 } | 336 } |
| 341 | 337 |
| 342 GLSurfaceAdapter::~GLSurfaceAdapter() {} | 338 GLSurfaceAdapter::~GLSurfaceAdapter() {} |
| 343 | 339 |
| 344 } // namespace gfx | 340 } // namespace gfx |
| OLD | NEW |