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

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

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 8 years 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/geometry_test_utils.cc ('k') | cc/thread_proxy.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_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;
24 23
25 void TestRenderPass::AppendOneOfEveryQuadType(cc::ResourceProvider* resourceProv ider) { 24 void TestRenderPass::AppendOneOfEveryQuadType(cc::ResourceProvider* resourceProv ider) {
26 gfx::Rect rect(0, 0, 100, 100); 25 gfx::Rect rect(0, 0, 100, 100);
27 gfx::Rect opaque_rect(10, 10, 80, 80); 26 gfx::Rect opaque_rect(10, 10, 80, 80);
28 cc::ResourceProvider::ResourceId texture_resource = 27 cc::ResourceProvider::ResourceId texture_resource =
29 resourceProvider->createResourceFromExternalTexture(1); 28 resourceProvider->createResourceFromExternalTexture(1);
30 scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create(); 29 scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create();
31 shared_state->SetAll(WebTransformationMatrix(), 30 shared_state->SetAll(gfx::Transform(),
32 rect, 31 rect,
33 rect, 32 rect,
34 rect, 33 rect,
35 false, 34 false,
36 1); 35 1);
37 36
38 scoped_ptr<cc::CheckerboardDrawQuad> checkerboard_quad = 37 scoped_ptr<cc::CheckerboardDrawQuad> checkerboard_quad =
39 cc::CheckerboardDrawQuad::Create(); 38 cc::CheckerboardDrawQuad::Create();
40 checkerboard_quad->SetNew(shared_state.get(), 39 checkerboard_quad->SetNew(shared_state.get(),
41 rect, 40 rect,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 rect, 79 rect,
81 SK_ColorRED); 80 SK_ColorRED);
82 AppendQuad(solid_color_quad.PassAs<DrawQuad>()); 81 AppendQuad(solid_color_quad.PassAs<DrawQuad>());
83 82
84 scoped_ptr<cc::StreamVideoDrawQuad> stream_video_quad = 83 scoped_ptr<cc::StreamVideoDrawQuad> stream_video_quad =
85 cc::StreamVideoDrawQuad::Create(); 84 cc::StreamVideoDrawQuad::Create();
86 stream_video_quad->SetNew(shared_state.get(), 85 stream_video_quad->SetNew(shared_state.get(),
87 rect, 86 rect,
88 opaque_rect, 87 opaque_rect,
89 1, 88 1,
90 WebKit::WebTransformationMatrix()); 89 gfx::Transform());
91 AppendQuad(stream_video_quad.PassAs<DrawQuad>()); 90 AppendQuad(stream_video_quad.PassAs<DrawQuad>());
92 91
93 scoped_ptr<cc::TextureDrawQuad> texture_quad = 92 scoped_ptr<cc::TextureDrawQuad> texture_quad =
94 cc::TextureDrawQuad::Create(); 93 cc::TextureDrawQuad::Create();
95 texture_quad->SetNew(shared_state.get(), 94 texture_quad->SetNew(shared_state.get(),
96 rect, 95 rect,
97 opaque_rect, 96 opaque_rect,
98 texture_resource, 97 texture_resource,
99 false, 98 false,
100 rect, 99 rect,
(...skipping 30 matching lines...) Expand all
131 gfx::Size(100, 100), 130 gfx::Size(100, 100),
132 planes[0], 131 planes[0],
133 planes[1], 132 planes[1],
134 planes[2]); 133 planes[2]);
135 AppendQuad(yuv_quad.PassAs<DrawQuad>()); 134 AppendQuad(yuv_quad.PassAs<DrawQuad>());
136 135
137 AppendSharedQuadState(shared_state.Pass()); 136 AppendSharedQuadState(shared_state.Pass());
138 } 137 }
139 138
140 } // namespace WebKitTests 139 } // namespace WebKitTests
OLDNEW
« no previous file with comments | « cc/test/geometry_test_utils.cc ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698