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

Unified Diff: media/tools/shader_bench/painter.cc

Issue 4873002: Benchmark tool for GPU-accelerated video rendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on code review Created 10 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
Index: media/tools/shader_bench/painter.cc
diff --git a/media/tools/shader_bench/painter.cc b/media/tools/shader_bench/painter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e82ce11d3a2c421be2c6f022d75f2ca2ce95dc57
--- /dev/null
+++ b/media/tools/shader_bench/painter.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 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.
+
+#include "media/tools/shader_bench/painter.h"
+
+Painter::Painter()
+ : frames_(0) {
Alpha Left Google 2010/11/29 20:06:13 frames_(NULL), only WebKit uses 0 instead of NULL.
vrk (LEFT CHROMIUM) 2010/11/30 01:21:35 Done.
+}
+
+void Painter::OnPaint() {
+ if (frames_ && !frames_->empty()) {
+ scoped_refptr<media::VideoFrame> cur_frame = frames_->front();
+ Paint(cur_frame);
+ frames_->pop_front();
+ frames_->push_back(cur_frame);
+ }
+}
+
+void Painter::LoadFrames(
+ std::deque<scoped_refptr<media::VideoFrame> >* frames) {
+ frames_ = frames;
+}

Powered by Google App Engine
This is Rietveld 408576698