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

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

Issue 592933003: Fix for surfaceless implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove debug code Created 6 years, 2 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/gl/gl_surface.cc ('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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 virtual bool IsOffscreen() OVERRIDE { return false; } 137 virtual bool IsOffscreen() OVERRIDE { return false; }
138 virtual VSyncProvider* GetVSyncProvider() OVERRIDE { 138 virtual VSyncProvider* GetVSyncProvider() OVERRIDE {
139 return vsync_provider_.get(); 139 return vsync_provider_.get();
140 } 140 }
141 virtual bool SupportsPostSubBuffer() OVERRIDE { return true; } 141 virtual bool SupportsPostSubBuffer() OVERRIDE { return true; }
142 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE { 142 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE {
143 // The actual sub buffer handling is handled at higher layers. 143 // The actual sub buffer handling is handled at higher layers.
144 SwapBuffers(); 144 SwapBuffers();
145 return true; 145 return true;
146 } 146 }
147 virtual bool IsSurfaceless() const OVERRIDE { return true; }
147 148
148 private: 149 private:
149 virtual ~GLSurfaceOzoneSurfaceless() { 150 virtual ~GLSurfaceOzoneSurfaceless() {
150 Destroy(); // EGL surface must be destroyed before SurfaceOzone 151 Destroy(); // EGL surface must be destroyed before SurfaceOzone
151 } 152 }
152 153
153 // The native surface. Deleting this is allowed to free the EGLNativeWindow. 154 // The native surface. Deleting this is allowed to free the EGLNativeWindow.
154 scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface_; 155 scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface_;
155 AcceleratedWidget widget_; 156 AcceleratedWidget widget_;
156 scoped_ptr<VSyncProvider> vsync_provider_; 157 scoped_ptr<VSyncProvider> vsync_provider_;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 NOTREACHED(); 248 NOTREACHED();
248 return NULL; 249 return NULL;
249 } 250 }
250 } 251 }
251 252
252 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 253 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
253 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); 254 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay();
254 } 255 }
255 256
256 } // namespace gfx 257 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698