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

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

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_egl.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; }
148 147
149 private: 148 private:
150 virtual ~GLSurfaceOzoneSurfaceless() { 149 virtual ~GLSurfaceOzoneSurfaceless() {
151 Destroy(); // EGL surface must be destroyed before SurfaceOzone 150 Destroy(); // EGL surface must be destroyed before SurfaceOzone
152 } 151 }
153 152
154 // The native surface. Deleting this is allowed to free the EGLNativeWindow. 153 // The native surface. Deleting this is allowed to free the EGLNativeWindow.
155 scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface_; 154 scoped_ptr<ui::SurfaceOzoneEGL> ozone_surface_;
156 AcceleratedWidget widget_; 155 AcceleratedWidget widget_;
157 scoped_ptr<VSyncProvider> vsync_provider_; 156 scoped_ptr<VSyncProvider> vsync_provider_;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 NOTREACHED(); 247 NOTREACHED();
249 return NULL; 248 return NULL;
250 } 249 }
251 } 250 }
252 251
253 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 252 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
254 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay(); 253 return ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay();
255 } 254 }
256 255
257 } // namespace gfx 256 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698