blob: d9c137ce991208f0a715d25bfb358192aac0798b (
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
27
28
29
30
31
|
// Copyright 2012 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.
#ifndef CCRenderPassTestCommon_h
#define CCRenderPassTestCommon_h
#include "cc/render_pass.h"
namespace WebKitTests {
class TestRenderPass : public cc::RenderPass {
public:
static scoped_ptr<TestRenderPass> create(Id id, gfx::Rect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget) {
return make_scoped_ptr(new TestRenderPass(id, outputRect, transformToRootTarget));
}
cc::QuadList& quadList() { return m_quadList; }
cc::SharedQuadStateList& sharedQuadStateList() { return m_sharedQuadStateList; }
void appendQuad(scoped_ptr<cc::DrawQuad> quad) { m_quadList.append(quad.Pass()); }
void appendSharedQuadState(scoped_ptr<cc::SharedQuadState> state) { m_sharedQuadStateList.append(state.Pass()); }
protected:
TestRenderPass(Id id, gfx::Rect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget)
: RenderPass(id, outputRect, transformToRootTarget) { }
};
} // namespace WebKitTests
#endif // CCRenderPassTestCommon_h
|