| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 #if defined(OS_WIN) | 359 #if defined(OS_WIN) |
| 360 vsync_override_ = false; | 360 vsync_override_ = false; |
| 361 swap_generation_ = 0; | 361 swap_generation_ = 0; |
| 362 RECT windowRect; | 362 RECT windowRect; |
| 363 if (GetClientRect(window_, &windowRect)) | 363 if (GetClientRect(window_, &windowRect)) |
| 364 size_ = gfx::Rect(windowRect).size(); | 364 size_ = gfx::Rect(windowRect).size(); |
| 365 #endif | 365 #endif |
| 366 } | 366 } |
| 367 | 367 |
| 368 bool NativeViewGLSurfaceEGL::Initialize() { | 368 bool NativeViewGLSurfaceEGL::Initialize() { |
| 369 return Initialize(scoped_ptr<VSyncProvider>()); | 369 return Initialize(nullptr); |
| 370 } | 370 } |
| 371 | 371 |
| 372 bool NativeViewGLSurfaceEGL::Initialize( | 372 bool NativeViewGLSurfaceEGL::Initialize( |
| 373 scoped_ptr<VSyncProvider> sync_provider) { | 373 scoped_ptr<VSyncProvider> sync_provider) { |
| 374 DCHECK(!surface_); | 374 DCHECK(!surface_); |
| 375 | 375 |
| 376 if (!GetDisplay()) { | 376 if (!GetDisplay()) { |
| 377 LOG(ERROR) << "Trying to create surface with invalid display."; | 377 LOG(ERROR) << "Trying to create surface with invalid display."; |
| 378 return false; | 378 return false; |
| 379 } | 379 } |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 } | 810 } |
| 811 | 811 |
| 812 void* SurfacelessEGL::GetShareHandle() { | 812 void* SurfacelessEGL::GetShareHandle() { |
| 813 return NULL; | 813 return NULL; |
| 814 } | 814 } |
| 815 | 815 |
| 816 SurfacelessEGL::~SurfacelessEGL() { | 816 SurfacelessEGL::~SurfacelessEGL() { |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace gfx | 819 } // namespace gfx |
| OLD | NEW |