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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 return eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, native_display, | 279 return eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, native_display, |
280 kDisplayAttribsWarp); | 280 kDisplayAttribsWarp); |
281 } | 281 } |
282 | 282 |
283 return eglGetDisplay(native_display); | 283 return eglGetDisplay(native_display); |
284 } | 284 } |
285 #endif | 285 #endif |
286 | 286 |
287 NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(EGLNativeWindowType window) | 287 NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(EGLNativeWindowType window) |
288 : window_(window), | 288 : window_(window), |
| 289 config_(NULL), |
289 surface_(NULL), | 290 surface_(NULL), |
290 supports_post_sub_buffer_(false), | 291 supports_post_sub_buffer_(false), |
291 config_(NULL), | |
292 size_(1, 1) { | 292 size_(1, 1) { |
293 #if defined(OS_ANDROID) | 293 #if defined(OS_ANDROID) |
294 if (window) | 294 if (window) |
295 ANativeWindow_acquire(window); | 295 ANativeWindow_acquire(window); |
296 #endif | 296 #endif |
297 | 297 |
298 #if defined(OS_WIN) | 298 #if defined(OS_WIN) |
299 RECT windowRect; | 299 RECT windowRect; |
300 if (GetClientRect(window_, &windowRect)) | 300 if (GetClientRect(window_, &windowRect)) |
301 size_ = gfx::Rect(windowRect).size(); | 301 size_ = gfx::Rect(windowRect).size(); |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 } | 708 } |
709 | 709 |
710 void* SurfacelessEGL::GetShareHandle() { | 710 void* SurfacelessEGL::GetShareHandle() { |
711 return NULL; | 711 return NULL; |
712 } | 712 } |
713 | 713 |
714 SurfacelessEGL::~SurfacelessEGL() { | 714 SurfacelessEGL::~SurfacelessEGL() { |
715 } | 715 } |
716 | 716 |
717 } // namespace gfx | 717 } // namespace gfx |
OLD | NEW |