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

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: a 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..75e96c61269aea14f418e1aed256fa878305108e
--- /dev/null
+++ b/content/common/gpu/media/rendering_helper.h
@@ -0,0 +1,65 @@
+// 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;
+}
+class MessageLoop;
+
+namespace video_test_util {
+
+// Creates and draws textures used by the video decoder.
Ami GONE FROM CHROMIUM 2012/05/15 17:55:22 Doco thread unsafety? Or is the mac impl more fle
sail 2012/05/15 23:53:31 Done.
+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;
+
+ // Returns the message loop that this object was initialized on.
+ virtual MessageLoop* GetMessageLoop() = 0;
Robert Sesek 2012/05/15 16:04:49 Proxy?
Ami GONE FROM CHROMIUM 2012/05/15 17:55:22 Unused?
sail 2012/05/15 23:53:31 Done. Yea, it turns out that this wasn't needed. R
+};
+
+
Robert Sesek 2012/05/15 16:04:49 nit: two extra blank lines
sail 2012/05/15 23:53:31 Done.
+
+} // namespace video_test_util
+
+#endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698