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

Unified Diff: ui/gfx/compositor/compositor_gl.cc

Issue 6975051: Remove COMPOSITOR_2 flag, old compositor code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change conditional compile defines. Created 9 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/compositor/compositor.h ('k') | views/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/compositor_gl.cc
diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc
index e591e2accf084ca4dc043c7eed8b0f6b53165469..5c68add57c321ee3ad90a613c6a54809620232ce 100644
--- a/ui/gfx/compositor/compositor_gl.cc
+++ b/ui/gfx/compositor/compositor_gl.cc
@@ -23,7 +23,6 @@
namespace ui {
-#if defined COMPOSITOR_2
namespace glHidden {
class CompositorGL;
@@ -362,71 +361,5 @@ Compositor* Compositor::Create(gfx::AcceleratedWidget widget) {
return new glHidden::CompositorGL(widget);
return NULL;
}
-#else
-class CompositorGL : public Compositor {
- public:
- explicit CompositorGL(gfx::AcceleratedWidget widget);
-
- private:
- // Overridden from Compositor.
- void NotifyStart() OVERRIDE;
- void NotifyEnd() OVERRIDE;
- void DrawTextureWithTransform(TextureID txt,
- const ui::Transform& transform) OVERRIDE;
- void SaveTransform() OVERRIDE;
- void RestoreTransform() OVERRIDE;
-
- // The GL context used for compositing.
- scoped_refptr<gfx::GLSurface> gl_surface_;
- scoped_refptr<gfx::GLContext> gl_context_;
-
- // Keep track of whether compositing has started or not.
- bool started_;
-
- DISALLOW_COPY_AND_ASSIGN(CompositorGL);
-};
-
-CompositorGL::CompositorGL(gfx::AcceleratedWidget widget)
- : started_(false) {
- gl_surface_ = gfx::GLSurface::CreateViewGLSurface(widget);
- gl_context_ = gfx::GLContext::CreateGLContext(NULL, gl_surface_.get());
-}
-
-void CompositorGL::NotifyStart() {
- started_ = true;
- gl_context_->MakeCurrent(gl_surface_.get());
-}
-
-void CompositorGL::NotifyEnd() {
- DCHECK(started_);
- gl_surface_->SwapBuffers();
- started_ = false;
-}
-
-void CompositorGL::DrawTextureWithTransform(TextureID txt,
- const ui::Transform& transform) {
- DCHECK(started_);
-
- // TODO(wjmaclean):
- NOTIMPLEMENTED();
-}
-
-void CompositorGL::SaveTransform() {
- // TODO(sadrul):
- NOTIMPLEMENTED();
-}
-
-void CompositorGL::RestoreTransform() {
- // TODO(sadrul):
- NOTIMPLEMENTED();
-}
-
-// static
-Compositor* Compositor::Create(gfx::AcceleratedWidget widget) {
- if (gfx::GetGLImplementation() != gfx::kGLImplementationNone)
- return new CompositorGL(widget);
- return NULL;
-}
-#endif
} // namespace ui
« no previous file with comments | « ui/gfx/compositor/compositor.h ('k') | views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698