summaryrefslogtreecommitdiff
path: root/chromium/media/tools/shader_bench/painter.cc
blob: ab8fc593473db7dc8b82c7f03de0d1b068d43b73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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_(NULL) {
}

Painter::~Painter() {
}

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;
}