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" | 8 #include "cc/quads/checkerboard_draw_quad.h" |
9 #include "cc/quads/debug_border_draw_quad.h" | 9 #include "cc/quads/debug_border_draw_quad.h" |
10 #include "cc/quads/io_surface_draw_quad.h" | 10 #include "cc/quads/io_surface_draw_quad.h" |
11 #include "cc/quads/render_pass_draw_quad.h" | 11 #include "cc/quads/render_pass_draw_quad.h" |
12 #include "cc/quads/shared_quad_state.h" | 12 #include "cc/quads/shared_quad_state.h" |
13 #include "cc/quads/solid_color_draw_quad.h" | 13 #include "cc/quads/solid_color_draw_quad.h" |
14 #include "cc/quads/stream_video_draw_quad.h" | 14 #include "cc/quads/stream_video_draw_quad.h" |
15 #include "cc/quads/texture_draw_quad.h" | 15 #include "cc/quads/texture_draw_quad.h" |
16 #include "cc/quads/tile_draw_quad.h" | 16 #include "cc/quads/tile_draw_quad.h" |
17 #include "cc/quads/yuv_video_draw_quad.h" | 17 #include "cc/quads/yuv_video_draw_quad.h" |
18 #include "cc/resources/resource_provider.h" | 18 #include "cc/resources/resource_provider.h" |
19 #include "ui/gfx/transform.h" | 19 #include "ui/gfx/transform.h" |
20 | 20 |
21 namespace cc { | 21 namespace cc { |
22 | 22 |
23 static void EmptyReleaseCallback(uint32 sync_point, bool lost_resource) { | 23 static void EmptyReleaseCallback(uint32 sync_point, bool lost_resource) { |
24 } | 24 } |
25 | 25 |
26 void TestRenderPass::AppendOneOfEveryQuadType( | 26 void TestRenderPass::AppendOneOfEveryQuadType( |
27 ResourceProvider* resource_provider, | 27 ResourceProvider* resource_provider, |
28 RenderPass::Id child_pass) { | 28 RenderPassId child_pass) { |
29 gfx::Rect rect(0, 0, 100, 100); | 29 gfx::Rect rect(0, 0, 100, 100); |
30 gfx::Rect opaque_rect(10, 10, 80, 80); | 30 gfx::Rect opaque_rect(10, 10, 80, 80); |
31 gfx::Rect visible_rect(0, 0, 100, 100); | 31 gfx::Rect visible_rect(0, 0, 100, 100); |
32 const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; | 32 const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; |
33 | 33 |
34 ResourceProvider::ResourceId resource1 = resource_provider->CreateResource( | 34 ResourceProvider::ResourceId resource1 = resource_provider->CreateResource( |
35 gfx::Size(45, 5), | 35 gfx::Size(45, 5), |
36 GL_CLAMP_TO_EDGE, | 36 GL_CLAMP_TO_EDGE, |
37 ResourceProvider::TextureUsageAny, | 37 ResourceProvider::TextureUsageAny, |
38 resource_provider->best_texture_format()); | 38 resource_provider->best_texture_format()); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 visible_rect, | 248 visible_rect, |
249 gfx::RectF(0, 0, 100, 100), | 249 gfx::RectF(0, 0, 100, 100), |
250 plane_resources[0], | 250 plane_resources[0], |
251 plane_resources[1], | 251 plane_resources[1], |
252 plane_resources[2], | 252 plane_resources[2], |
253 plane_resources[3], | 253 plane_resources[3], |
254 color_space); | 254 color_space); |
255 } | 255 } |
256 | 256 |
257 } // namespace cc | 257 } // namespace cc |
OLD | NEW |