summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gl/gl_surface_osmesa.h
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 23:22:33 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 23:22:33 +0000
commitba0397cbdf573dbac43377fb4523c23a1ae17e49 (patch)
treec18744a26e4763de61a485717c5b1d4621f46e26 /ui/gfx/gl/gl_surface_osmesa.h
parenta75c745fea9303f01a6c9eb8915dbb292d996889 (diff)
downloadchromium_src-ba0397cbdf573dbac43377fb4523c23a1ae17e49.zip
chromium_src-ba0397cbdf573dbac43377fb4523c23a1ae17e49.tar.gz
chromium_src-ba0397cbdf573dbac43377fb4523c23a1ae17e49.tar.bz2
Revert 81998 - Split OSMesa implementations of *GLContext into GLContextOSMesa and *GLSurfaceOSMesa.Surfaces are independent of contexts in GL. To facilitate sharing of surfaces between processes, I have separated them from the notion of contexts because contexts cannot be shared between processes.I started with EGL in r81512 and WGL in r81807. This is the same thing for OSMesa.GLContextOSMesa still has a pointer to a surface and still has some surface specific operations that just forward through to it. Once I have refactored all the GLContext implementations in this way, I will remove these pointers and the surface specific opertations.There will not be "view" and "offscreen" GL contexts. Rather there will be a single context type for each backend which can be made current with a surface that directs output either to a view or offscreen surface.TEST=WebGL locally, tryBUG=noneReview URL: http://codereview.chromium.org/6864031
TBR=kbr@chromium.org Review URL: http://codereview.chromium.org/6882030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl/gl_surface_osmesa.h')
-rw-r--r--ui/gfx/gl/gl_surface_osmesa.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/ui/gfx/gl/gl_surface_osmesa.h b/ui/gfx/gl/gl_surface_osmesa.h
deleted file mode 100644
index 742d28a..0000000
--- a/ui/gfx/gl/gl_surface_osmesa.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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_OSMESA_H_
-#define UI_GFX_GL_GL_SURFACE_OSMESA_H_
-#pragma once
-
-#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/gl/gl_surface.h"
-#include "ui/gfx/size.h"
-
-namespace gfx {
-
-// A surface that the Mesa software renderer draws to. This is actually just a
-// buffer in system memory. GetHandle returns a pointer to the buffer. These
-// surfaces can be resized and resizing preserves the contents.
-class GLSurfaceOSMesa : public GLSurface {
- public:
- GLSurfaceOSMesa();
- virtual ~GLSurfaceOSMesa();
-
- // Resize the back buffer, preserving the old content. Does nothing if the
- // size is unchanged.
- void Resize(const gfx::Size& new_size);
-
- // Implement GLSurface.
- virtual void Destroy();
- virtual bool IsOffscreen();
- virtual bool SwapBuffers();
- virtual gfx::Size GetSize();
- virtual void* GetHandle();
-
- private:
- gfx::Size size_;
- scoped_array<int32> buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesa);
-};
-
-} // namespace gfx
-
-#endif // UI_GFX_GL_GL_SURFACE_OSMESA_H_