OLD | NEW |
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_common.h" | 5 #include "cc/test/render_pass_test_common.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "cc/quads/checkerboard_draw_quad.h" | |
9 #include "cc/quads/debug_border_draw_quad.h" | 8 #include "cc/quads/debug_border_draw_quad.h" |
10 #include "cc/quads/io_surface_draw_quad.h" | 9 #include "cc/quads/io_surface_draw_quad.h" |
11 #include "cc/quads/render_pass_draw_quad.h" | 10 #include "cc/quads/render_pass_draw_quad.h" |
12 #include "cc/quads/shared_quad_state.h" | 11 #include "cc/quads/shared_quad_state.h" |
13 #include "cc/quads/solid_color_draw_quad.h" | 12 #include "cc/quads/solid_color_draw_quad.h" |
14 #include "cc/quads/stream_video_draw_quad.h" | 13 #include "cc/quads/stream_video_draw_quad.h" |
15 #include "cc/quads/texture_draw_quad.h" | 14 #include "cc/quads/texture_draw_quad.h" |
16 #include "cc/quads/tile_draw_quad.h" | 15 #include "cc/quads/tile_draw_quad.h" |
17 #include "cc/quads/yuv_video_draw_quad.h" | 16 #include "cc/quads/yuv_video_draw_quad.h" |
18 #include "cc/resources/resource_provider.h" | 17 #include "cc/resources/resource_provider.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 SharedQuadState* shared_state = this->CreateAndAppendSharedQuadState(); | 83 SharedQuadState* shared_state = this->CreateAndAppendSharedQuadState(); |
85 shared_state->SetAll(gfx::Transform(), | 84 shared_state->SetAll(gfx::Transform(), |
86 rect.size(), | 85 rect.size(), |
87 rect, | 86 rect, |
88 rect, | 87 rect, |
89 false, | 88 false, |
90 1, | 89 1, |
91 SkXfermode::kSrcOver_Mode, | 90 SkXfermode::kSrcOver_Mode, |
92 0); | 91 0); |
93 | 92 |
94 CheckerboardDrawQuad* checkerboard_quad = | |
95 this->CreateAndAppendDrawQuad<CheckerboardDrawQuad>(); | |
96 checkerboard_quad->SetNew(shared_state, rect, visible_rect, SK_ColorRED, 1.f); | |
97 | |
98 DebugBorderDrawQuad* debug_border_quad = | 93 DebugBorderDrawQuad* debug_border_quad = |
99 this->CreateAndAppendDrawQuad<DebugBorderDrawQuad>(); | 94 this->CreateAndAppendDrawQuad<DebugBorderDrawQuad>(); |
100 debug_border_quad->SetNew(shared_state, rect, visible_rect, SK_ColorRED, 1); | 95 debug_border_quad->SetNew(shared_state, rect, visible_rect, SK_ColorRED, 1); |
101 | 96 |
102 IOSurfaceDrawQuad* io_surface_quad = | 97 IOSurfaceDrawQuad* io_surface_quad = |
103 this->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); | 98 this->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); |
104 io_surface_quad->SetNew(shared_state, | 99 io_surface_quad->SetNew(shared_state, |
105 rect, | 100 rect, |
106 opaque_rect, | 101 opaque_rect, |
107 visible_rect, | 102 visible_rect, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 YUVVideoDrawQuad* yuv_quad = | 235 YUVVideoDrawQuad* yuv_quad = |
241 this->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); | 236 this->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); |
242 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect, | 237 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect, |
243 gfx::RectF(.0f, .0f, 100.0f, 100.0f), | 238 gfx::RectF(.0f, .0f, 100.0f, 100.0f), |
244 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100), | 239 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100), |
245 gfx::Size(50, 50), plane_resources[0], plane_resources[1], | 240 gfx::Size(50, 50), plane_resources[0], plane_resources[1], |
246 plane_resources[2], plane_resources[3], color_space); | 241 plane_resources[2], plane_resources[3], color_space); |
247 } | 242 } |
248 | 243 |
249 } // namespace cc | 244 } // namespace cc |
OLD | NEW |