OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "media/tools/shader_bench/painter.h" |
| 6 |
| 7 Painter::Painter() |
| 8 : frames_(NULL) { |
| 9 } |
| 10 |
| 11 Painter::~Painter() { |
| 12 } |
| 13 |
| 14 void Painter::OnPaint() { |
| 15 if (frames_ && !frames_->empty()) { |
| 16 scoped_refptr<media::VideoFrame> cur_frame = frames_->front(); |
| 17 Paint(cur_frame); |
| 18 frames_->pop_front(); |
| 19 frames_->push_back(cur_frame); |
| 20 } |
| 21 } |
| 22 |
| 23 void Painter::LoadFrames( |
| 24 std::deque<scoped_refptr<media::VideoFrame> >* frames) { |
| 25 frames_ = frames; |
| 26 } |
OLD | NEW |