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

Unified Diff: media/filters/context_3d_provider.h

Issue 445013002: media: Optimize HW Video to 2D Canvas copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix window component build Created 6 years, 1 month 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 | « media/blink/webmediaplayer_params.cc ('k') | media/filters/skcanvas_video_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/context_3d_provider.h
diff --git a/media/filters/context_3d_provider.h b/media/filters/context_3d_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b68957778131adcef9fafbed4230ca69ab05757
--- /dev/null
+++ b/media/filters/context_3d_provider.h
@@ -0,0 +1,37 @@
+// Copyright (c) 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 MEDIA_FILTERS_CONTEXT_3D_PROVIDER_H_
+#define MEDIA_FILTERS_CONTEXT_3D_PROVIDER_H_
+
+class GrContext;
+
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+}
+
+namespace media {
+
+// This struct can be used to make media use gpu::gles2::GLES2Interface and
+// GrContext.
+// Usage:
+// gpu::gles2::GLES2Interface* gl = ...;
+// GrContext* gr_context = ...;
+// Context3DProvider provider(gl, gr_context);
+
+struct Context3DProvider {
jamesr 2014/11/24 22:19:50 cc::ContextProvider exists to provide a shared own
+ Context3DProvider() : gl(nullptr), gr_context(nullptr) {}
+ Context3DProvider(gpu::gles2::GLES2Interface* gl_,
+ class GrContext* gr_context_)
+ : gl(gl_), gr_context(gr_context_) {}
+
+ gpu::gles2::GLES2Interface* gl;
+ class GrContext* gr_context;
+};
+
+} // namespace media
+
+#endif // MEDIA_FILTERS_CONTEXT_3D_PROVIDER_H_
« no previous file with comments | « media/blink/webmediaplayer_params.cc ('k') | media/filters/skcanvas_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698