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

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

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ozone demo Created 5 years, 6 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_glx.cc ('k') | ui/gl/gl_surface_osmesa.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <OpenGL/CGLRenderers.h> 7 #include <OpenGL/CGLRenderers.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 // made current. Everywhere this surface type is used, we allocate an 25 // made current. Everywhere this surface type is used, we allocate an
26 // FBO at the user level as the drawable of the associated context. 26 // FBO at the user level as the drawable of the associated context.
27 class GL_EXPORT NoOpGLSurface : public GLSurface { 27 class GL_EXPORT NoOpGLSurface : public GLSurface {
28 public: 28 public:
29 explicit NoOpGLSurface(const gfx::Size& size) : size_(size) {} 29 explicit NoOpGLSurface(const gfx::Size& size) : size_(size) {}
30 30
31 // Implement GLSurface. 31 // Implement GLSurface.
32 bool Initialize() override { return true; } 32 bool Initialize() override { return true; }
33 void Destroy() override {} 33 void Destroy() override {}
34 bool IsOffscreen() override { return true; } 34 bool IsOffscreen() override { return true; }
35 bool SwapBuffers() override { 35 gfx::SwapResult SwapBuffers() override {
36 NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface."; 36 NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface.";
37 return false; 37 return gfx::SwapResult::SWAP_FAILED;
38 } 38 }
39 gfx::Size GetSize() override { return size_; } 39 gfx::Size GetSize() override { return size_; }
40 void* GetHandle() override { return NULL; } 40 void* GetHandle() override { return NULL; }
41 void* GetDisplay() override { return NULL; } 41 void* GetDisplay() override { return NULL; }
42 bool IsSurfaceless() const override { return true; } 42 bool IsSurfaceless() const override { return true; }
43 43
44 protected: 44 protected:
45 ~NoOpGLSurface() override {} 45 ~NoOpGLSurface() override {}
46 46
47 private: 47 private:
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 case kGLImplementationMockGL: 156 case kGLImplementationMockGL:
157 return new GLSurfaceStub; 157 return new GLSurfaceStub;
158 default: 158 default:
159 NOTREACHED(); 159 NOTREACHED();
160 return NULL; 160 return NULL;
161 } 161 }
162 } 162 }
163 163
164 } // namespace gfx 164 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_glx.cc ('k') | ui/gl/gl_surface_osmesa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698