summaryrefslogtreecommitdiffstats
path: root/media/base/factory.h
diff options
context:
space:
mode:
authorwjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 19:15:07 +0000
committerwjia@google.com <wjia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 19:15:07 +0000
commit5e83826af14858fca1ebac8281afa75107281e7b (patch)
tree467fbad219ff625270ebe0455dabe4459f1c7e36 /media/base/factory.h
parentcc2de439d0fd34aac593b1fabc40f0626c5848e1 (diff)
downloadchromium_src-5e83826af14858fca1ebac8281afa75107281e7b.zip
chromium_src-5e83826af14858fca1ebac8281afa75107281e7b.tar.gz
chromium_src-5e83826af14858fca1ebac8281afa75107281e7b.tar.bz2
1. remove initial rendering lag time for egl image decoding path
2. put all GLES operations in one thread BUG=none TEST=dev platform and desktop Review URL: http://codereview.chromium.org/2836019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50749 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/factory.h')
-rw-r--r--media/base/factory.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/media/base/factory.h b/media/base/factory.h
index ade8990..49bd868 100644
--- a/media/base/factory.h
+++ b/media/base/factory.h
@@ -187,6 +187,32 @@ class FilterFactoryImpl2 : public FilterFactory {
DISALLOW_COPY_AND_ASSIGN(FilterFactoryImpl2);
};
+template <class Filter, class A, class B, class C>
+class FilterFactoryImpl3 : public FilterFactory {
+ public:
+ FilterFactoryImpl3(A a, B b, C c) : a_(a), b_(b), c_(c) {}
+
+ protected:
+ virtual MediaFilter* Create(FilterType filter_type,
+ const MediaFormat& media_format) {
+ Filter* filter = NULL;
+ if (Filter::filter_type() == filter_type &&
+ Filter::IsMediaFormatSupported(media_format)) {
+ filter = new Filter(a_, b_, c_);
+ }
+ return filter;
+ }
+
+ private:
+ ~FilterFactoryImpl3() {}
+
+ A const a_;
+ B const b_;
+ C const c_;
+
+ DISALLOW_COPY_AND_ASSIGN(FilterFactoryImpl3);
+};
+
//------------------------------------------------------------------------------
// This specialized factory is typically used by test programs that create