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

Side by Side Diff: app/gfx/gl/gl_context_stub.h

Issue 5783004: Keep deinlining stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Well, it all compiles locally? Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file implements the StubGLContext. 5 // This file implements the StubGLContext.
6 6
7 #ifndef APP_GFX_GL_GL_CONTEXT_STUB_H_ 7 #ifndef APP_GFX_GL_GL_CONTEXT_STUB_H_
8 #define APP_GFX_GL_GL_CONTEXT_STUB_H_ 8 #define APP_GFX_GL_GL_CONTEXT_STUB_H_
9 #pragma once 9 #pragma once
10 10
11 #include "app/gfx/gl/gl_context.h" 11 #include "app/gfx/gl/gl_context.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 14
15 // A GLContext that does nothing for unit tests. 15 // A GLContext that does nothing for unit tests.
16 class StubGLContext : public gfx::GLContext { 16 class StubGLContext : public gfx::GLContext {
17 public: 17 public:
18 virtual ~StubGLContext();
19
18 // Implement GLContext. 20 // Implement GLContext.
19 virtual void Destroy() {} 21 virtual void Destroy() {}
20 virtual bool MakeCurrent() { return true; } 22 virtual bool MakeCurrent();
21 virtual bool IsCurrent() { return true; } 23 virtual bool IsCurrent();
22 virtual bool IsOffscreen() { return false; } 24 virtual bool IsOffscreen();
23 virtual bool SwapBuffers() { return true; } 25 virtual bool SwapBuffers();
24 virtual gfx::Size GetSize() { return size_; } 26 virtual gfx::Size GetSize();
25 virtual void* GetHandle() { return NULL; } 27 virtual void* GetHandle();
26 virtual void SetSwapInterval(int interval) {} 28 virtual void SetSwapInterval(int interval) {}
27 virtual std::string GetExtensions() { return std::string(); } 29 virtual std::string GetExtensions();
28 30
29 void SetSize(const gfx::Size& size) { size_ = size; } 31 void SetSize(const gfx::Size& size) { size_ = size; }
30 32
31 private: 33 private:
32 gfx::Size size_; 34 gfx::Size size_;
33 }; 35 };
34 36
35 } // namespace gfx 37 } // namespace gfx
36 38
37 #endif // APP_GFX_GL_GL_CONTEXT_STUB_H_ 39 #endif // APP_GFX_GL_GL_CONTEXT_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698