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

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

Issue 12965007: Fix cpplint errors in cc/(animation|input|layers|trees|test)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 8 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_utils.h ('k') | cc/test/scheduler_test_common.h » ('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/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/layers/quad_sink.h" 8 #include "cc/layers/quad_sink.h"
9 #include "cc/quads/render_pass_draw_quad.h" 9 #include "cc/quads/render_pass_draw_quad.h"
10 #include "cc/quads/shared_quad_state.h" 10 #include "cc/quads/shared_quad_state.h"
11 #include "cc/quads/solid_color_draw_quad.h" 11 #include "cc/quads/solid_color_draw_quad.h"
12 #include "cc/test/mock_quad_culler.h" 12 #include "cc/test/mock_quad_culler.h"
13 #include "cc/test/render_pass_test_common.h" 13 #include "cc/test/render_pass_test_common.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 TestRenderPass* AddRenderPass(RenderPassList& pass_list, 18 TestRenderPass* AddRenderPass(RenderPassList* pass_list,
19 RenderPass::Id id, 19 RenderPass::Id id,
20 gfx::Rect output_rect, 20 gfx::Rect output_rect,
21 const gfx::Transform& root_transform) { 21 const gfx::Transform& root_transform) {
22 scoped_ptr<TestRenderPass> pass(TestRenderPass::Create()); 22 scoped_ptr<TestRenderPass> pass(TestRenderPass::Create());
23 pass->SetNew(id, output_rect, output_rect, root_transform); 23 pass->SetNew(id, output_rect, output_rect, root_transform);
24 TestRenderPass* saved = pass.get(); 24 TestRenderPass* saved = pass.get();
25 pass_list.push_back(pass.PassAs<RenderPass>()); 25 pass_list->push_back(pass.PassAs<RenderPass>());
26 return saved; 26 return saved;
27 } 27 }
28 28
29 SolidColorDrawQuad* AddQuad(TestRenderPass* pass, 29 SolidColorDrawQuad* AddQuad(TestRenderPass* pass,
30 gfx::Rect rect, 30 gfx::Rect rect,
31 SkColor color) { 31 SkColor color) {
32 MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); 32 MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list);
33 AppendQuadsData data(pass->id); 33 AppendQuadsData data(pass->id);
34 SharedQuadState* shared_state = 34 SharedQuadState* shared_state =
35 quad_sink.UseSharedQuadState(SharedQuadState::Create()); 35 quad_sink.UseSharedQuadState(SharedQuadState::Create());
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 shared_state->SetAll( 67 shared_state->SetAll(
68 gfx::Transform(), output_rect.size(), output_rect, output_rect, false, 1); 68 gfx::Transform(), output_rect.size(), output_rect, output_rect, false, 1);
69 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); 69 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create();
70 quad->SetNew(shared_state, output_rect, contributing_pass->id, false, 0, 70 quad->SetNew(shared_state, output_rect, contributing_pass->id, false, 0,
71 output_rect, gfx::RectF(), WebKit::WebFilterOperations(), 71 output_rect, gfx::RectF(), WebKit::WebFilterOperations(),
72 skia::RefPtr<SkImageFilter>(), WebKit::WebFilterOperations()); 72 skia::RefPtr<SkImageFilter>(), WebKit::WebFilterOperations());
73 quad_sink.Append(quad.PassAs<DrawQuad>(), &data); 73 quad_sink.Append(quad.PassAs<DrawQuad>(), &data);
74 } 74 }
75 75
76 } // namespace cc 76 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/render_pass_test_utils.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698