diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 00:25:46 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 00:25:46 +0000 |
commit | e134cf21752f90003a17fe0a0d38a05fe2728edb (patch) | |
tree | 2f9a59be1e117bb1d14660bc94f7d884e03e169c /ui/gfx/gl/gl_surface_stub.h | |
parent | e4d9a972ed8350b5e45f5da90b2a1b5ab47c1ca7 (diff) | |
download | chromium_src-e134cf21752f90003a17fe0a0d38a05fe2728edb.zip chromium_src-e134cf21752f90003a17fe0a0d38a05fe2728edb.tar.gz chromium_src-e134cf21752f90003a17fe0a0d38a05fe2728edb.tar.bz2 |
Reland 85013 - Split GLContext::Create*GLContext into GLSurface::Create*GLSurface plus a surface type independent GLContext::CreateGLContext.
TEST=webgl on windows and mac, trybots
BUG=none
Review URL: http://codereview.chromium.org/6997003
Review URL: http://codereview.chromium.org/7015016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl/gl_surface_stub.h')
-rw-r--r-- | ui/gfx/gl/gl_surface_stub.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ui/gfx/gl/gl_surface_stub.h b/ui/gfx/gl/gl_surface_stub.h new file mode 100644 index 0000000..da494be --- /dev/null +++ b/ui/gfx/gl/gl_surface_stub.h @@ -0,0 +1,33 @@ +// Copyright (c) 2011 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. + +#ifndef UI_GFX_GL_GL_SURFACE_STUB_H_ +#define UI_GFX_GL_GL_SURFACE_STUB_H_ +#pragma once + +#include "ui/gfx/gl/gl_surface.h" + +namespace gfx { + +// A GLSurface that does nothing for unit tests. +class GLSurfaceStub : public GLSurface { + public: + virtual ~GLSurfaceStub(); + + void SetSize(const gfx::Size& size) { size_ = size; } + + // Implement GLSurface. + virtual void Destroy(); + virtual bool IsOffscreen(); + virtual bool SwapBuffers(); + virtual gfx::Size GetSize(); + virtual void* GetHandle(); + + private: + gfx::Size size_; +}; + +} // namespace gfx + +#endif // UI_GFX_GL_GL_SURFACE_STUB_H_ |