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

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

Issue 516663003: Surfaceless OutputSurface implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests for new bind/init order Created 6 years, 3 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 | « content/content_tests.gypi ('k') | 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return false; 115 return false;
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.
126 glFinish();
125 return ozone_surface_->OnSwapBuffers(); 127 return ozone_surface_->OnSwapBuffers();
126 } 128 }
127 virtual bool ScheduleOverlayPlane(int z_order, 129 virtual bool ScheduleOverlayPlane(int z_order,
128 OverlayTransform transform, 130 OverlayTransform transform,
129 GLImage* image, 131 GLImage* image,
130 const Rect& bounds_rect, 132 const Rect& bounds_rect,
131 const RectF& crop_rect) OVERRIDE { 133 const RectF& crop_rect) OVERRIDE {
132 return image->ScheduleOverlayPlane( 134 return image->ScheduleOverlayPlane(
133 widget_, z_order, transform, bounds_rect, crop_rect); 135 widget_, z_order, transform, bounds_rect, crop_rect);
134 } 136 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 NOTREACHED(); 241 NOTREACHED();
240 return NULL; 242 return NULL;
241 } 243 }
242 } 244 }
243 245
244 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 246 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
245 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); 247 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay();
246 } 248 }
247 249
248 } // namespace gfx 250 } // namespace gfx
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698