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

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

Issue 10388108: Implement media::VideoDecodeAccelerator on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix cros build Created 8 years, 7 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/rendering_helper.h
diff --git a/content/common/gpu/media/rendering_helper.h b/content/common/gpu/media/rendering_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..ff99f654c56ca4e110dab55574ad713898ff598b
--- /dev/null
+++ b/content/common/gpu/media/rendering_helper.h
@@ -0,0 +1,61 @@
+// Copyright (c) 2012 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_RENDERING_HELPER_H_
+#define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_
+
+#include "base/basictypes.h"
+
+namespace base {
+class WaitableEvent;
+}
+
+namespace video_test_util {
+
+// Creates and draws textures used by the video decoder.
+// This class is not thread safe and thus all the methods of this class
+// (except for ctor/dtor) ensure they're being run on a single thread.
+class RenderingHelper {
+ public:
+ // Create a platform specifc implementation this object.
+ static RenderingHelper* Create();
+
+ // Platform specific setup.
+ static void InitializePlatform();
+
+ RenderingHelper() {}
+ virtual ~RenderingHelper() {}
+
+ // Create the window and render context.
+ virtual void Initialize(bool suppress_swap_to_display,
+ int num_windows,
+ int width,
+ int height,
+ base::WaitableEvent* done) = 0;
+
+ // Undo the effects of Initialize() and signal |*done|.
+ virtual void UnInitialize(base::WaitableEvent* done) = 0;
+
+ // Return a newly-created GLES2 texture id rendering to a specific window, and
+ // signal |*done|.
+ virtual void CreateTexture(int window_id,
+ uint32* texture_id,
+ base::WaitableEvent* done) = 0;
+
+ // Render |texture_id| to the screen (unless |suppress_swap_to_display_|).
+ virtual void RenderTexture(uint32 texture_id) = 0;
+
+ // Delete |texture_id|.
+ virtual void DeleteTexture(uint32 texture_id) = 0;
+
+ // Get the platform specific handle to the OpenGL context.
+ virtual void* GetGLContext() = 0;
+
+ // Get the platform specific handle to the OpenGL display.
+ virtual void* GetGLDisplay() = 0;
+};
+
+} // namespace video_test_util
+
+#endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_
« no previous file with comments | « content/common/gpu/media/mac_video_decode_accelerator.mm ('k') | content/common/gpu/media/rendering_helper_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698