OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/threading/worker_pool.h" | 14 #include "base/threading/worker_pool.h" |
15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.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_image_ozone_native_pixmap.h" | 18 #include "ui/gl/gl_image_ozone_native_pixmap.h" |
19 #include "ui/gl/gl_implementation.h" | 19 #include "ui/gl/gl_implementation.h" |
20 #include "ui/gl/gl_surface_egl.h" | 20 #include "ui/gl/gl_surface_egl.h" |
21 #include "ui/gl/gl_surface_osmesa.h" | 21 #include "ui/gl/gl_surface_osmesa.h" |
22 #include "ui/gl/gl_surface_stub.h" | 22 #include "ui/gl/gl_surface_stub.h" |
23 #include "ui/gl/scoped_binders.h" | 23 #include "ui/gl/scoped_binders.h" |
24 #include "ui/gl/scoped_make_current.h" | 24 #include "ui/gl/scoped_make_current.h" |
25 #include "ui/ozone/public/native_pixmap.h" | 25 #include "ui/ozone/public/native_pixmap.h" |
26 #include "ui/ozone/public/ozone_platform.h" | 26 #include "ui/ozone/public/ozone_platform.h" |
27 #include "ui/ozone/public/surface_factory_ozone.h" | 27 #include "ui/ozone/public/surface_factory_ozone.h" |
28 #include "ui/ozone/public/surface_ozone_egl.h" | 28 #include "ui/ozone/public/surface_ozone_egl.h" |
29 | 29 |
| 30 using gl::GLImage; |
| 31 |
30 namespace gfx { | 32 namespace gfx { |
31 | 33 |
32 namespace { | 34 namespace { |
33 | 35 |
34 void WaitForFence(EGLDisplay display, EGLSyncKHR fence) { | 36 void WaitForFence(EGLDisplay display, EGLSyncKHR fence) { |
35 eglClientWaitSyncKHR(display, fence, EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, | 37 eglClientWaitSyncKHR(display, fence, EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, |
36 EGL_FOREVER_KHR); | 38 EGL_FOREVER_KHR); |
37 } | 39 } |
38 | 40 |
39 // A thin wrapper around GLSurfaceEGL that owns the EGLNativeWindow. | 41 // A thin wrapper around GLSurfaceEGL that owns the EGLNativeWindow. |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 } | 711 } |
710 } | 712 } |
711 | 713 |
712 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 714 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
713 return ui::OzonePlatform::GetInstance() | 715 return ui::OzonePlatform::GetInstance() |
714 ->GetSurfaceFactoryOzone() | 716 ->GetSurfaceFactoryOzone() |
715 ->GetNativeDisplay(); | 717 ->GetNativeDisplay(); |
716 } | 718 } |
717 | 719 |
718 } // namespace gfx | 720 } // namespace gfx |
OLD | NEW |