summaryrefslogtreecommitdiffstats
path: root/cc/quads/draw_quad_unittest.cc
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2015-06-18 17:10:43 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-19 00:11:03 +0000
commit64767d90be693c7e98efd1a0794bb567b46262ec (patch)
tree6b8685977805702e4806fc95746c4d509dcd0b43 /cc/quads/draw_quad_unittest.cc
parentf468166ed6757854d10fa3288476d881c947a7c4 (diff)
downloadchromium_src-64767d90be693c7e98efd1a0794bb567b46262ec.zip
chromium_src-64767d90be693c7e98efd1a0794bb567b46262ec.tar.gz
chromium_src-64767d90be693c7e98efd1a0794bb567b46262ec.tar.bz2
cc: Rename visible_content_rect and content stuff on quads.
This renames visible_content_rect to visible_layer_rect. And for SharedQuadState renames the transforms and rects to no longer refer to "content" and instead refer to the space the the DrawQuad rects. R=enne, vmpstr TBR=dcheng BUG=413479 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1175113010 Cr-Commit-Position: refs/heads/master@{#335172}
Diffstat (limited to 'cc/quads/draw_quad_unittest.cc')
-rw-r--r--cc/quads/draw_quad_unittest.cc32
1 files changed, 10 insertions, 22 deletions
diff --git a/cc/quads/draw_quad_unittest.cc b/cc/quads/draw_quad_unittest.cc
index 5bce42e..833f388 100644
--- a/cc/quads/draw_quad_unittest.cc
+++ b/cc/quads/draw_quad_unittest.cc
@@ -34,8 +34,8 @@ namespace {
TEST(DrawQuadTest, CopySharedQuadState) {
gfx::Transform quad_transform = gfx::Transform(1.0, 0.0, 0.5, 1.0, 0.5, 0.0);
- gfx::Size content_bounds(26, 28);
- gfx::Rect visible_content_rect(10, 12, 14, 16);
+ gfx::Size layer_bounds(26, 28);
+ gfx::Rect visible_layer_rect(10, 12, 14, 16);
gfx::Rect clip_rect(19, 21, 23, 25);
bool is_clipped = true;
float opacity = 0.25f;
@@ -43,19 +43,13 @@ TEST(DrawQuadTest, CopySharedQuadState) {
int sorting_context_id = 65536;
scoped_ptr<SharedQuadState> state(new SharedQuadState);
- state->SetAll(quad_transform,
- content_bounds,
- visible_content_rect,
- clip_rect,
- is_clipped,
- opacity,
- blend_mode,
- sorting_context_id);
+ state->SetAll(quad_transform, layer_bounds, visible_layer_rect, clip_rect,
+ is_clipped, opacity, blend_mode, sorting_context_id);
scoped_ptr<SharedQuadState> copy(new SharedQuadState);
copy->CopyFrom(state.get());
- EXPECT_EQ(quad_transform, copy->content_to_target_transform);
- EXPECT_EQ(visible_content_rect, copy->visible_content_rect);
+ EXPECT_EQ(quad_transform, copy->quad_to_target_transform);
+ EXPECT_EQ(visible_layer_rect, copy->visible_quad_layer_rect);
EXPECT_EQ(opacity, copy->opacity);
EXPECT_EQ(clip_rect, copy->clip_rect);
EXPECT_EQ(is_clipped, copy->is_clipped);
@@ -64,8 +58,8 @@ TEST(DrawQuadTest, CopySharedQuadState) {
SharedQuadState* CreateSharedQuadState(RenderPass* render_pass) {
gfx::Transform quad_transform = gfx::Transform(1.0, 0.0, 0.5, 1.0, 0.5, 0.0);
- gfx::Size content_bounds(26, 28);
- gfx::Rect visible_content_rect(10, 12, 14, 16);
+ gfx::Size layer_bounds(26, 28);
+ gfx::Rect visible_layer_rect(10, 12, 14, 16);
gfx::Rect clip_rect(19, 21, 23, 25);
bool is_clipped = false;
float opacity = 1.f;
@@ -73,14 +67,8 @@ SharedQuadState* CreateSharedQuadState(RenderPass* render_pass) {
SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode;
SharedQuadState* state = render_pass->CreateAndAppendSharedQuadState();
- state->SetAll(quad_transform,
- content_bounds,
- visible_content_rect,
- clip_rect,
- is_clipped,
- opacity,
- blend_mode,
- sorting_context_id);
+ state->SetAll(quad_transform, layer_bounds, visible_layer_rect, clip_rect,
+ is_clipped, opacity, blend_mode, sorting_context_id);
return state;
}