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

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

Issue 1327033004: Allow building mojo_shell and non-graphical apps/services on a Mac (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review feedback Created 5 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 | « ui/gl/BUILD.gn ('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 (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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 25 matching lines...) Expand all
36 public: 36 public:
37 explicit NoOpGLSurface(const gfx::Size& size, 37 explicit NoOpGLSurface(const gfx::Size& size,
38 const gfx::SurfaceConfiguration conf) 38 const gfx::SurfaceConfiguration conf)
39 : GLSurface(conf), 39 : GLSurface(conf),
40 size_(size) {} 40 size_(size) {}
41 41
42 // Implement GLSurface. 42 // Implement GLSurface.
43 bool Initialize() override { return true; } 43 bool Initialize() override { return true; }
44 void Destroy() override {} 44 void Destroy() override {}
45 bool IsOffscreen() override { return true; } 45 bool IsOffscreen() override { return true; }
46 bool SwapBuffers() override { 46 gfx::SwapResult SwapBuffers() override {
47 NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface."; 47 NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface.";
48 return false; 48 return gfx::SwapResult::SWAP_FAILED;
49 } 49 }
50 gfx::Size GetSize() override { return size_; } 50 gfx::Size GetSize() override { return size_; }
51 void* GetHandle() override { return NULL; } 51 void* GetHandle() override { return NULL; }
52 void* GetDisplay() override { return NULL; } 52 void* GetDisplay() override { return NULL; }
53 bool IsSurfaceless() const override { return true; } 53 bool IsSurfaceless() const override { return true; }
54 54
55 protected: 55 protected:
56 ~NoOpGLSurface() override {} 56 ~NoOpGLSurface() override {}
57 57
58 private: 58 private:
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 case kGLImplementationMockGL: 152 case kGLImplementationMockGL:
153 return new GLSurfaceStub(conf); 153 return new GLSurfaceStub(conf);
154 default: 154 default:
155 NOTREACHED(); 155 NOTREACHED();
156 return NULL; 156 return NULL;
157 } 157 }
158 } 158 }
159 159
160 } // namespace gfx 160 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698