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

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

Issue 664583004: Mark NoOpGLSurface as surfaceless. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « gpu/command_buffer/service/gles2_cmd_decoder.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 (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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 22 matching lines...) Expand all
33 virtual bool Initialize() override { return true; } 33 virtual bool Initialize() override { return true; }
34 virtual void Destroy() override {} 34 virtual void Destroy() override {}
35 virtual bool IsOffscreen() override { return true; } 35 virtual bool IsOffscreen() override { return true; }
36 virtual bool SwapBuffers() override { 36 virtual bool SwapBuffers() override {
37 NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface."; 37 NOTREACHED() << "Cannot call SwapBuffers on a NoOpGLSurface.";
38 return false; 38 return false;
39 } 39 }
40 virtual gfx::Size GetSize() override { return size_; } 40 virtual gfx::Size GetSize() override { return size_; }
41 virtual void* GetHandle() override { return NULL; } 41 virtual void* GetHandle() override { return NULL; }
42 virtual void* GetDisplay() override { return NULL; } 42 virtual void* GetDisplay() override { return NULL; }
43 virtual bool IsSurfaceless() const override { return true; }
43 44
44 protected: 45 protected:
45 virtual ~NoOpGLSurface() {} 46 virtual ~NoOpGLSurface() {}
46 47
47 private: 48 private:
48 gfx::Size size_; 49 gfx::Size size_;
49 50
50 DISALLOW_COPY_AND_ASSIGN(NoOpGLSurface); 51 DISALLOW_COPY_AND_ASSIGN(NoOpGLSurface);
51 }; 52 };
52 53
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 153 }
153 case kGLImplementationMockGL: 154 case kGLImplementationMockGL:
154 return new GLSurfaceStub; 155 return new GLSurfaceStub;
155 default: 156 default:
156 NOTREACHED(); 157 NOTREACHED();
157 return NULL; 158 return NULL;
158 } 159 }
159 } 160 }
160 161
161 } // namespace gfx 162 } // namespace gfx
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698