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

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

Issue 582543002: Fix refresh rate query for internal monitors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gl/gl_context.h" 10 #include "ui/gl/gl_context.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return true; 116 return true;
117 } 117 }
118 virtual bool Resize(const gfx::Size& size) override { 118 virtual bool Resize(const gfx::Size& size) override {
119 if (!ozone_surface_->ResizeNativeWindow(size)) 119 if (!ozone_surface_->ResizeNativeWindow(size))
120 return false; 120 return false;
121 121
122 return SurfacelessEGL::Resize(size); 122 return SurfacelessEGL::Resize(size);
123 } 123 }
124 virtual bool SwapBuffers() override { 124 virtual bool SwapBuffers() override {
125 // TODO: this should be replaced by a fence when supported by the driver. 125 // TODO: this should be replaced by a fence when supported by the driver.
126 glFinish(); 126 glFlush();
127 return ozone_surface_->OnSwapBuffers(); 127 return ozone_surface_->OnSwapBuffers();
128 } 128 }
129 virtual bool ScheduleOverlayPlane(int z_order, 129 virtual bool ScheduleOverlayPlane(int z_order,
130 OverlayTransform transform, 130 OverlayTransform transform,
131 GLImage* image, 131 GLImage* image,
132 const Rect& bounds_rect, 132 const Rect& bounds_rect,
133 const RectF& crop_rect) override { 133 const RectF& crop_rect) override {
134 return image->ScheduleOverlayPlane( 134 return image->ScheduleOverlayPlane(
135 widget_, z_order, transform, bounds_rect, crop_rect); 135 widget_, z_order, transform, bounds_rect, crop_rect);
136 } 136 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 NOTREACHED(); 247 NOTREACHED();
248 return NULL; 248 return NULL;
249 } 249 }
250 } 250 }
251 251
252 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 252 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
253 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); 253 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay();
254 } 254 }
255 255
256 } // namespace gfx 256 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698