diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/app_base.gypi | 1 | ||||
-rw-r--r-- | app/gfx/gl/gl_context_stub.cc | 39 | ||||
-rw-r--r-- | app/gfx/gl/gl_context_stub.h | 16 | ||||
-rw-r--r-- | app/gfx/gl/gl_implementation_linux.cc | 1 |
4 files changed, 49 insertions, 8 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi index dad6f9e..3715498 100644 --- a/app/app_base.gypi +++ b/app/app_base.gypi @@ -130,6 +130,7 @@ 'gfx/gl/gl_context_mac.cc', 'gfx/gl/gl_context_osmesa.cc', 'gfx/gl/gl_context_osmesa.h', + 'gfx/gl/gl_context_stub.cc', 'gfx/gl/gl_context_stub.h', 'gfx/gl/gl_context_win.cc', 'gfx/gl/gl_headers.h', diff --git a/app/gfx/gl/gl_context_stub.cc b/app/gfx/gl/gl_context_stub.cc new file mode 100644 index 0000000..62825c7 --- /dev/null +++ b/app/gfx/gl/gl_context_stub.cc @@ -0,0 +1,39 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "app/gfx/gl/gl_context_stub.h" + +namespace gfx { + +StubGLContext::~StubGLContext() {} + +bool StubGLContext::MakeCurrent() { + return true; +} + +bool StubGLContext::IsCurrent() { + return true; +} + +bool StubGLContext::IsOffscreen() { + return false; +} + +bool StubGLContext::SwapBuffers() { + return true; +} + +gfx::Size StubGLContext::GetSize() { + return size_; +} + +void* StubGLContext::GetHandle() { + return NULL; +} + +std::string StubGLContext::GetExtensions() { + return std::string(); +} + +} // namespace gfx diff --git a/app/gfx/gl/gl_context_stub.h b/app/gfx/gl/gl_context_stub.h index 0037044..d4a1e18 100644 --- a/app/gfx/gl/gl_context_stub.h +++ b/app/gfx/gl/gl_context_stub.h @@ -15,16 +15,18 @@ namespace gfx { // A GLContext that does nothing for unit tests. class StubGLContext : public gfx::GLContext { public: + virtual ~StubGLContext(); + // Implement GLContext. virtual void Destroy() {} - virtual bool MakeCurrent() { return true; } - virtual bool IsCurrent() { return true; } - virtual bool IsOffscreen() { return false; } - virtual bool SwapBuffers() { return true; } - virtual gfx::Size GetSize() { return size_; } - virtual void* GetHandle() { return NULL; } + virtual bool MakeCurrent(); + virtual bool IsCurrent(); + virtual bool IsOffscreen(); + virtual bool SwapBuffers(); + virtual gfx::Size GetSize(); + virtual void* GetHandle(); virtual void SetSwapInterval(int interval) {} - virtual std::string GetExtensions() { return std::string(); } + virtual std::string GetExtensions(); void SetSize(const gfx::Size& size) { size_ = size; } diff --git a/app/gfx/gl/gl_implementation_linux.cc b/app/gfx/gl/gl_implementation_linux.cc index 74fd21e..8ac29a3 100644 --- a/app/gfx/gl/gl_implementation_linux.cc +++ b/app/gfx/gl/gl_implementation_linux.cc @@ -5,7 +5,6 @@ #include <vector> #include "app/gfx/gl/gl_bindings.h" -#include "app/gfx/gl/gl_context_stub.h" #include "app/gfx/gl/gl_implementation.h" #include "base/base_paths.h" #include "base/command_line.h" |