OLD | NEW |
---|---|
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 Loading... | |
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 glFinish(); | |
piman
2014/09/15 18:29:58
nit: can you add a TODO/bug?
achaulk
2014/09/15 18:41:25
Done.
| |
125 return ozone_surface_->OnSwapBuffers(); | 126 return ozone_surface_->OnSwapBuffers(); |
126 } | 127 } |
127 virtual bool ScheduleOverlayPlane(int z_order, | 128 virtual bool ScheduleOverlayPlane(int z_order, |
128 OverlayTransform transform, | 129 OverlayTransform transform, |
129 GLImage* image, | 130 GLImage* image, |
130 const Rect& bounds_rect, | 131 const Rect& bounds_rect, |
131 const RectF& crop_rect) OVERRIDE { | 132 const RectF& crop_rect) OVERRIDE { |
132 return image->ScheduleOverlayPlane( | 133 return image->ScheduleOverlayPlane( |
133 widget_, z_order, transform, bounds_rect, crop_rect); | 134 widget_, z_order, transform, bounds_rect, crop_rect); |
134 } | 135 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 NOTREACHED(); | 240 NOTREACHED(); |
240 return NULL; | 241 return NULL; |
241 } | 242 } |
242 } | 243 } |
243 | 244 |
244 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { | 245 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { |
245 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); | 246 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); |
246 } | 247 } |
247 | 248 |
248 } // namespace gfx | 249 } // namespace gfx |
OLD | NEW |