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

Unified Diff: media/base/composite_filter.cc

Issue 8897022: Revert 113895 - <video> decode in hardware! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/base/composite_filter.h ('k') | media/base/composite_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/composite_filter.cc
===================================================================
--- media/base/composite_filter.cc (revision 113907)
+++ media/base/composite_filter.cc (working copy)
@@ -57,8 +57,6 @@
}
bool CompositeFilter::AddFilter(scoped_refptr<Filter> filter) {
- // TODO(fischman,scherkus): s/bool/void/ the return type and CHECK on failure
- // of the sanity-checks that return false today.
DCHECK_EQ(message_loop_, MessageLoop::current());
if (!filter.get() || state_ != kCreated || !host())
return false;
@@ -69,23 +67,6 @@
return true;
}
-void CompositeFilter::RemoveFilter(scoped_refptr<Filter> filter) {
- DCHECK_EQ(message_loop_, MessageLoop::current());
- if (!filter.get() || state_ != kCreated || !host())
- LOG(FATAL) << "Unknown filter, or in unexpected state.";
-
- bool found = false;
- for (FilterVector::iterator it = filters_.begin();
- it != filters_.end() && !found; ++it) {
- if (it->get() == filter.get()) {
- filters_.erase(it);
- found = true;
- }
- }
- filter->clear_host();
- CHECK(found);
-}
-
void CompositeFilter::set_host(FilterHost* host) {
DCHECK_EQ(message_loop_, MessageLoop::current());
DCHECK(host);
@@ -356,6 +337,7 @@
DispatchPendingCallback(status_);
return;
}
+
if (!filters_.empty())
sequence_index_++;
@@ -393,6 +375,7 @@
void CompositeFilter::OnCallSequenceDone() {
State next_state = GetNextState(state_);
+
if (next_state == kInvalid) {
// We somehow got into an unexpected state.
ChangeState(kError);
Property changes on: media/base/composite_filter.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « media/base/composite_filter.h ('k') | media/base/composite_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698