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

Side by Side Diff: cc/test/render_pass_test_utils.h

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: Rebase again Created 4 years 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 unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/test/render_pass_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_RENDER_PASS_TEST_UTILS_H_ 5 #ifndef CC_TEST_RENDER_PASS_TEST_UTILS_H_
6 #define CC_TEST_RENDER_PASS_TEST_UTILS_H_ 6 #define CC_TEST_RENDER_PASS_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "cc/output/filter_operations.h" 10 #include "cc/output/filter_operations.h"
11 #include "cc/quads/render_pass.h" 11 #include "cc/quads/render_pass.h"
12 #include "cc/resources/resource_provider.h" 12 #include "cc/resources/resource_provider.h"
13 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Rect; 16 class Rect;
17 class Transform; 17 class Transform;
18 } 18 }
19 19
20 namespace cc { 20 namespace cc {
21 21
22 class SolidColorDrawQuad; 22 class SolidColorDrawQuad;
23 class RenderPass; 23 class RenderPass;
24 24
25 // Adds a new render pass with the provided properties to the given 25 // Adds a new render pass with the provided properties to the given
26 // render pass list. 26 // render pass list.
27 RenderPass* AddRenderPass(RenderPassList* pass_list, 27 RenderPass* AddRenderPass(RenderPassList* pass_list,
28 int render_pass_id, 28 int render_pass_id,
29 const gfx::Rect& output_rect, 29 const gfx::Rect& output_rect,
30 const gfx::Transform& root_transform); 30 const gfx::Transform& root_transform,
31 const FilterOperations& filters);
31 32
32 // Adds a solid quad to a given render pass. 33 // Adds a solid quad to a given render pass.
33 SolidColorDrawQuad* AddQuad(RenderPass* pass, 34 SolidColorDrawQuad* AddQuad(RenderPass* pass,
34 const gfx::Rect& rect, 35 const gfx::Rect& rect,
35 SkColor color); 36 SkColor color);
36 37
37 // Adds a solid quad to a given render pass and sets is_clipped=true. 38 // Adds a solid quad to a given render pass and sets is_clipped=true.
38 SolidColorDrawQuad* AddClippedQuad(RenderPass* pass, 39 SolidColorDrawQuad* AddClippedQuad(RenderPass* pass,
39 const gfx::Rect& rect, 40 const gfx::Rect& rect,
40 SkColor color); 41 SkColor color);
41 42
42 // Adds a solid quad with a transform to a given render pass. 43 // Adds a solid quad with a transform to a given render pass.
43 SolidColorDrawQuad* AddTransformedQuad(RenderPass* pass, 44 SolidColorDrawQuad* AddTransformedQuad(RenderPass* pass,
44 const gfx::Rect& rect, 45 const gfx::Rect& rect,
45 SkColor color, 46 SkColor color,
46 const gfx::Transform& transform); 47 const gfx::Transform& transform);
47 48
48 // Adds a render pass quad to an existing render pass. 49 // Adds a render pass quad to an existing render pass.
49 void AddRenderPassQuad(RenderPass* to_pass, RenderPass* contributing_pass); 50 void AddRenderPassQuad(RenderPass* to_pass, RenderPass* contributing_pass);
50 51
51 // Adds a render pass quad with the given mask resource, filter, and transform. 52 // Adds a render pass quad with the given mask resource, filter, and transform.
52 void AddRenderPassQuad(RenderPass* to_pass, 53 void AddRenderPassQuad(RenderPass* to_pass,
53 RenderPass* contributing_pass, 54 RenderPass* contributing_pass,
54 ResourceId mask_resource_id, 55 ResourceId mask_resource_id,
55 const FilterOperations& filters,
56 gfx::Transform transform, 56 gfx::Transform transform,
57 SkBlendMode blend_mode); 57 SkBlendMode blend_mode);
58 58
59 void AddOneOfEveryQuadType(RenderPass* to_pass, 59 void AddOneOfEveryQuadType(RenderPass* to_pass,
60 ResourceProvider* resource_provider, 60 ResourceProvider* resource_provider,
61 int child_pass_id, 61 int child_pass_id,
62 gpu::SyncToken* sync_token_for_mailbox_texture); 62 gpu::SyncToken* sync_token_for_mailbox_texture);
63 63
64 } // namespace cc 64 } // namespace cc
65 65
66 #endif // CC_TEST_RENDER_PASS_TEST_UTILS_H_ 66 #endif // CC_TEST_RENDER_PASS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/test/render_pass_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698