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

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

Issue 394193003: Implement HiDPI and pinch-zoom scaling of filter params (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra headers; unneeded code in tests Created 6 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « cc/test/render_pass_test_common.cc ('k') | cc/trees/layer_tree_host_pixeltest_filters.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 #include "cc/test/render_pass_test_utils.h" 5 #include "cc/test/render_pass_test_utils.h"
6 6
7 #include "cc/quads/render_pass_draw_quad.h" 7 #include "cc/quads/render_pass_draw_quad.h"
8 #include "cc/quads/shared_quad_state.h" 8 #include "cc/quads/shared_quad_state.h"
9 #include "cc/quads/solid_color_draw_quad.h" 9 #include "cc/quads/solid_color_draw_quad.h"
10 #include "cc/resources/resource_provider.h" 10 #include "cc/resources/resource_provider.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 97 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
98 quad->SetNew(shared_state, 98 quad->SetNew(shared_state,
99 output_rect, 99 output_rect,
100 output_rect, 100 output_rect,
101 contributing_pass->id, 101 contributing_pass->id,
102 false, 102 false,
103 0, 103 0,
104 output_rect, 104 output_rect,
105 gfx::RectF(), 105 gfx::RectF(),
106 FilterOperations(), 106 FilterOperations(),
107 gfx::Vector2dF(),
107 FilterOperations()); 108 FilterOperations());
108 } 109 }
109 110
110 void AddRenderPassQuad(TestRenderPass* to_pass, 111 void AddRenderPassQuad(TestRenderPass* to_pass,
111 TestRenderPass* contributing_pass, 112 TestRenderPass* contributing_pass,
112 ResourceProvider::ResourceId mask_resource_id, 113 ResourceProvider::ResourceId mask_resource_id,
113 const FilterOperations& filters, 114 const FilterOperations& filters,
114 gfx::Transform transform) { 115 gfx::Transform transform) {
115 gfx::Rect output_rect = contributing_pass->output_rect; 116 gfx::Rect output_rect = contributing_pass->output_rect;
116 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState(); 117 SharedQuadState* shared_state = to_pass->CreateAndAppendSharedQuadState();
117 shared_state->SetAll(transform, 118 shared_state->SetAll(transform,
118 output_rect.size(), 119 output_rect.size(),
119 output_rect, 120 output_rect,
120 output_rect, 121 output_rect,
121 false, 122 false,
122 1, 123 1,
123 SkXfermode::kSrcOver_Mode, 124 SkXfermode::kSrcOver_Mode,
124 0); 125 0);
125 RenderPassDrawQuad* quad = 126 RenderPassDrawQuad* quad =
126 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 127 to_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
127 quad->SetNew(shared_state, 128 quad->SetNew(shared_state,
128 output_rect, 129 output_rect,
129 output_rect, 130 output_rect,
130 contributing_pass->id, 131 contributing_pass->id,
131 false, 132 false,
132 mask_resource_id, 133 mask_resource_id,
133 output_rect, 134 output_rect,
134 gfx::RectF(), 135 gfx::RectF(),
135 filters, 136 filters,
137 gfx::Vector2dF(),
136 FilterOperations()); 138 FilterOperations());
137 } 139 }
138 140
139 } // namespace cc 141 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/render_pass_test_common.cc ('k') | cc/trees/layer_tree_host_pixeltest_filters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698