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

Unified Diff: content/common/gpu/media/gl_renderer.h

Issue 940903002: video_decode_accelerator_unittest: enable test on ozone surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after split Created 5 years, 10 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
Index: content/common/gpu/media/gl_renderer.h
diff --git a/content/common/gpu/media/gl_renderer.h b/content/common/gpu/media/gl_renderer.h
new file mode 100644
index 0000000000000000000000000000000000000000..a82f904b3fca6bca673f39a79f7855d824fc69a5
--- /dev/null
+++ b/content/common/gpu/media/gl_renderer.h
@@ -0,0 +1,48 @@
+// Copyright 2014 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 CONTENT_COMMON_GPU_MEDIA_GL_RENDERER_H_
+#define CONTENT_COMMON_GPU_MEDIA_GL_RENDERER_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace gfx {
+class GLContext;
+class GLSurface;
+} // namespace gfx
+
+namespace content {
+
+class GlRenderer {
+ public:
+ GlRenderer(gfx::AcceleratedWidget widget, const gfx::Size& size);
+ virtual ~GlRenderer();
+
+ virtual bool Initialize();
+ virtual bool MakeCurrent();
+ virtual void SwapBuffers();
+ virtual bool IsFlipped();
+
+ virtual void BindFramebuffer(uint32_t fbo);
+ virtual void UnbindFramebuffer();
+
+ scoped_refptr<gfx::GLContext> gl_context() const { return context_; }
+ scoped_refptr<gfx::GLSurface> gl_surface() const { return surface_; }
+
+ protected:
+ scoped_refptr<gfx::GLSurface> surface_;
+ scoped_refptr<gfx::GLContext> context_;
+
+ gfx::AcceleratedWidget widget_;
+ gfx::Size size_;
+
+ DISALLOW_COPY_AND_ASSIGN(GlRenderer);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_GL_RENDERER_H_
« no previous file with comments | « no previous file | content/common/gpu/media/gl_renderer.cc » ('j') | content/common/gpu/media/surfaceless_gl_renderer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698