| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |