| 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 "cc/checkerboard_draw_quad.h" | 7 #include "cc/checkerboard_draw_quad.h" |
| 8 #include "cc/debug_border_draw_quad.h" | 8 #include "cc/debug_border_draw_quad.h" |
| 9 #include "cc/io_surface_draw_quad.h" | 9 #include "cc/io_surface_draw_quad.h" |
| 10 #include "cc/render_pass_draw_quad.h" | 10 #include "cc/render_pass_draw_quad.h" |
| 11 #include "cc/solid_color_draw_quad.h" | 11 #include "cc/solid_color_draw_quad.h" |
| 12 #include "cc/shared_quad_state.h" | 12 #include "cc/shared_quad_state.h" |
| 13 #include "cc/stream_video_draw_quad.h" | 13 #include "cc/stream_video_draw_quad.h" |
| 14 #include "cc/texture_draw_quad.h" | 14 #include "cc/texture_draw_quad.h" |
| 15 #include "cc/tile_draw_quad.h" | 15 #include "cc/tile_draw_quad.h" |
| 16 #include "cc/yuv_video_draw_quad.h" | 16 #include "cc/yuv_video_draw_quad.h" |
| 17 #include "cc/resource_provider.h" | 17 #include "cc/resource_provider.h" |
| 18 #include <public/WebTransformationMatrix.h> | 18 #include "ui/gfx/transform.h" |
| 19 | 19 |
| 20 namespace WebKitTests { | 20 namespace WebKitTests { |
| 21 | 21 |
| 22 using cc::DrawQuad; | 22 using cc::DrawQuad; |
| 23 using WebKit::WebTransformationMatrix; | 23 using gfx::Transform; |
| 24 | 24 |
| 25 void TestRenderPass::AppendOneOfEveryQuadType(cc::ResourceProvider* resourceProv
ider) { | 25 void TestRenderPass::AppendOneOfEveryQuadType(cc::ResourceProvider* resourceProv
ider) { |
| 26 gfx::Rect rect(0, 0, 100, 100); | 26 gfx::Rect rect(0, 0, 100, 100); |
| 27 gfx::Rect opaque_rect(10, 10, 80, 80); | 27 gfx::Rect opaque_rect(10, 10, 80, 80); |
| 28 cc::ResourceProvider::ResourceId texture_resource = | 28 cc::ResourceProvider::ResourceId texture_resource = |
| 29 resourceProvider->createResourceFromExternalTexture(1); | 29 resourceProvider->createResourceFromExternalTexture(1); |
| 30 scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create(); | 30 scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create(); |
| 31 shared_state->SetAll(WebTransformationMatrix(), | 31 shared_state->SetAll(Transform(), |
| 32 rect, | 32 rect, |
| 33 rect, | 33 rect, |
| 34 rect, | 34 rect, |
| 35 false, | 35 false, |
| 36 1); | 36 1); |
| 37 | 37 |
| 38 scoped_ptr<cc::CheckerboardDrawQuad> checkerboard_quad = | 38 scoped_ptr<cc::CheckerboardDrawQuad> checkerboard_quad = |
| 39 cc::CheckerboardDrawQuad::Create(); | 39 cc::CheckerboardDrawQuad::Create(); |
| 40 checkerboard_quad->SetNew(shared_state.get(), | 40 checkerboard_quad->SetNew(shared_state.get(), |
| 41 rect, | 41 rect, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 rect, | 80 rect, |
| 81 SK_ColorRED); | 81 SK_ColorRED); |
| 82 AppendQuad(solid_color_quad.PassAs<DrawQuad>()); | 82 AppendQuad(solid_color_quad.PassAs<DrawQuad>()); |
| 83 | 83 |
| 84 scoped_ptr<cc::StreamVideoDrawQuad> stream_video_quad = | 84 scoped_ptr<cc::StreamVideoDrawQuad> stream_video_quad = |
| 85 cc::StreamVideoDrawQuad::Create(); | 85 cc::StreamVideoDrawQuad::Create(); |
| 86 stream_video_quad->SetNew(shared_state.get(), | 86 stream_video_quad->SetNew(shared_state.get(), |
| 87 rect, | 87 rect, |
| 88 opaque_rect, | 88 opaque_rect, |
| 89 1, | 89 1, |
| 90 WebKit::WebTransformationMatrix()); | 90 gfx::Transform()); |
| 91 AppendQuad(stream_video_quad.PassAs<DrawQuad>()); | 91 AppendQuad(stream_video_quad.PassAs<DrawQuad>()); |
| 92 | 92 |
| 93 scoped_ptr<cc::TextureDrawQuad> texture_quad = | 93 scoped_ptr<cc::TextureDrawQuad> texture_quad = |
| 94 cc::TextureDrawQuad::Create(); | 94 cc::TextureDrawQuad::Create(); |
| 95 texture_quad->SetNew(shared_state.get(), | 95 texture_quad->SetNew(shared_state.get(), |
| 96 rect, | 96 rect, |
| 97 opaque_rect, | 97 opaque_rect, |
| 98 texture_resource, | 98 texture_resource, |
| 99 false, | 99 false, |
| 100 rect, | 100 rect, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 131 gfx::Size(100, 100), | 131 gfx::Size(100, 100), |
| 132 planes[0], | 132 planes[0], |
| 133 planes[1], | 133 planes[1], |
| 134 planes[2]); | 134 planes[2]); |
| 135 AppendQuad(yuv_quad.PassAs<DrawQuad>()); | 135 AppendQuad(yuv_quad.PassAs<DrawQuad>()); |
| 136 | 136 |
| 137 AppendSharedQuadState(shared_state.Pass()); | 137 AppendSharedQuadState(shared_state.Pass()); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace WebKitTests | 140 } // namespace WebKitTests |
| OLD | NEW |