Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/frame_time.h ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/gfx/frame_time.h ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698