Lots of random cleanups, mostly for native_theme_win.cc:
[chromium-blink-merge.git] / cc / test / render_pass_test_utils.h
blobdb739b9518bdc947cb12b1d9fbea4a61cfe7dba1
1 // Copyright 2012 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.
5 #ifndef CC_TEST_RENDER_PASS_TEST_UTILS_H_
6 #define CC_TEST_RENDER_PASS_TEST_UTILS_H_
8 #include "cc/base/scoped_ptr_vector.h"
9 #include "cc/output/filter_operations.h"
10 #include "cc/quads/render_pass.h"
11 #include "cc/resources/resource_provider.h"
12 #include "third_party/skia/include/core/SkColor.h"
14 namespace gfx {
15 class Rect;
16 class Transform;
19 namespace cc {
21 class SolidColorDrawQuad;
22 class TestRenderPass;
24 // Adds a new render pass with the provided properties to the given
25 // render pass list.
26 TestRenderPass* AddRenderPass(
27 RenderPassList* pass_list,
28 RenderPass::Id id,
29 const gfx::Rect& output_rect,
30 const gfx::Transform& root_transform);
32 // Adds a solid quad to a given render pass.
33 SolidColorDrawQuad* AddQuad(TestRenderPass* pass,
34 const gfx::Rect& rect,
35 SkColor color);
37 // Adds a solid quad to a given render pass and sets is_clipped=true.
38 SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass,
39 const gfx::Rect& rect,
40 SkColor color);
42 // Adds a solid quad with a transform to a given render pass.
43 SolidColorDrawQuad* AddTransformedQuad(TestRenderPass* pass,
44 const gfx::Rect& rect,
45 SkColor color,
46 const gfx::Transform& transform);
48 // Adds a render pass quad to an existing render pass.
49 void AddRenderPassQuad(TestRenderPass* to_pass,
50 TestRenderPass* contributing_pass);
52 // Adds a render pass quad with the given mask resource, filter, and transform.
53 void AddRenderPassQuad(TestRenderPass* toPass,
54 TestRenderPass* contributing_pass,
55 ResourceProvider::ResourceId mask_resource_id,
56 const FilterOperations& filters,
57 gfx::Transform transform);
59 } // namespace cc
61 #endif // CC_TEST_RENDER_PASS_TEST_UTILS_H_