| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ozone/platform/cast/gl_surface_cast.h" | 5 #include "ui/ozone/platform/cast/gl_surface_cast.h" |
| 6 | 6 |
| 7 #include "ui/ozone/common/egl_util.h" | 7 #include "ui/ozone/common/egl_util.h" |
| 8 #include "ui/ozone/platform/cast/surface_factory_cast.h" | 8 #include "ui/ozone/platform/cast/gl_ozone_egl_cast.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| 11 | 11 |
| 12 GLSurfaceCast::GLSurfaceCast(gfx::AcceleratedWidget widget, | 12 GLSurfaceCast::GLSurfaceCast(gfx::AcceleratedWidget widget, |
| 13 SurfaceFactoryCast* parent) | 13 GLOzoneEglCast* parent) |
| 14 : NativeViewGLSurfaceEGL(parent->GetNativeWindow()), | 14 : NativeViewGLSurfaceEGL(parent->GetNativeWindow()), |
| 15 widget_(widget), | 15 widget_(widget), |
| 16 parent_(parent), | 16 parent_(parent), |
| 17 supports_swap_buffer_with_bounds_( | 17 supports_swap_buffer_with_bounds_( |
| 18 base::CommandLine::ForCurrentProcess()->HasSwitch( | 18 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 19 switches::kEnableSwapBuffersWithBounds)) { | 19 switches::kEnableSwapBuffersWithBounds)) { |
| 20 DCHECK(parent_); | 20 DCHECK(parent_); |
| 21 } | 21 } |
| 22 | 22 |
| 23 bool GLSurfaceCast::SupportsSwapBuffersWithBounds() { | 23 bool GLSurfaceCast::SupportsSwapBuffersWithBounds() { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 return config_; | 90 return config_; |
| 91 } | 91 } |
| 92 | 92 |
| 93 GLSurfaceCast::~GLSurfaceCast() { | 93 GLSurfaceCast::~GLSurfaceCast() { |
| 94 Destroy(); | 94 Destroy(); |
| 95 parent_->ChildDestroyed(); | 95 parent_->ChildDestroyed(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace ui | 98 } // namespace ui |
| OLD | NEW |