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_egl.h" | 5 #include "ui/gl/gl_surface_egl.h" |
6 | 6 |
7 #if defined(OS_ANDROID) | 7 #if defined(OS_ANDROID) |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 return g_egl_create_context_robustness_supported; | 214 return g_egl_create_context_robustness_supported; |
215 } | 215 } |
216 | 216 |
217 GLSurfaceEGL::~GLSurfaceEGL() {} | 217 GLSurfaceEGL::~GLSurfaceEGL() {} |
218 | 218 |
219 NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software, | 219 NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software, |
220 gfx::AcceleratedWidget window) | 220 gfx::AcceleratedWidget window) |
221 : window_(window), | 221 : window_(window), |
222 surface_(NULL), | 222 surface_(NULL), |
223 supports_post_sub_buffer_(false), | 223 supports_post_sub_buffer_(false), |
224 config_(NULL) { | 224 config_(NULL), |
| 225 recreate_on_make_current_(false) { |
225 software_ = software; | 226 software_ = software; |
226 #if defined(OS_ANDROID) | 227 #if defined(OS_ANDROID) |
227 if (window) | 228 if (window) |
228 ANativeWindow_acquire(window); | 229 ANativeWindow_acquire(window); |
229 #endif | 230 #endif |
230 } | 231 } |
231 | 232 |
232 bool NativeViewGLSurfaceEGL::Initialize() { | 233 bool NativeViewGLSurfaceEGL::Initialize() { |
233 DCHECK(!surface_); | 234 DCHECK(!surface_); |
234 | 235 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 | 583 |
583 return handle; | 584 return handle; |
584 #endif | 585 #endif |
585 } | 586 } |
586 | 587 |
587 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() { | 588 PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() { |
588 Destroy(); | 589 Destroy(); |
589 } | 590 } |
590 | 591 |
591 } // namespace gfx | 592 } // namespace gfx |
OLD | NEW |