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

Unified Diff: cc/surfaces/surface_aggregator_unittest.cc

Issue 1175113010: cc: Rename visible_content_rect and content stuff on quads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename-visible-content-rect: moreandroid Created 5 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_aggregator_test_helpers.cc ('k') | cc/surfaces/surfaces_pixeltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator_unittest.cc
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index 981a5730053c7389fdec13c6d5b164d7b8c91f05..b657efa1982c57a478936caf5c77ecb756032ec3 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -690,9 +690,9 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, RenderPassIdMapping) {
void AddSolidColorQuadWithBlendMode(const gfx::Size& size,
RenderPass* pass,
const SkXfermode::Mode blend_mode) {
- const gfx::Transform content_to_target_transform;
- const gfx::Size content_bounds(size);
- const gfx::Rect visible_content_rect(size);
+ const gfx::Transform layer_to_target_transform;
+ const gfx::Size layer_bounds(size);
+ const gfx::Rect visible_layer_rect(size);
const gfx::Rect clip_rect(size);
bool is_clipped = false;
@@ -700,21 +700,13 @@ void AddSolidColorQuadWithBlendMode(const gfx::Size& size,
bool force_anti_aliasing_off = false;
SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
- sqs->SetAll(content_to_target_transform,
- content_bounds,
- visible_content_rect,
- clip_rect,
- is_clipped,
- opacity,
- blend_mode,
- 0);
+ sqs->SetAll(layer_to_target_transform, layer_bounds, visible_layer_rect,
+ clip_rect, is_clipped, opacity, blend_mode, 0);
SolidColorDrawQuad* color_quad =
pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
- color_quad->SetNew(pass->shared_quad_state_list.back(),
- visible_content_rect,
- visible_content_rect,
- SK_ColorGREEN,
+ color_quad->SetNew(pass->shared_quad_state_list.back(), visible_layer_rect,
+ visible_layer_rect, SK_ColorGREEN,
force_anti_aliasing_off);
}
@@ -889,12 +881,12 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
child_nonroot_pass->transform_to_root_target.Translate(8, 0);
SharedQuadState* child_nonroot_pass_sqs =
child_nonroot_pass->shared_quad_state_list.front();
- child_nonroot_pass_sqs->content_to_target_transform.Translate(5, 0);
+ child_nonroot_pass_sqs->quad_to_target_transform.Translate(5, 0);
RenderPass* child_root_pass = child_pass_list.at(1u);
SharedQuadState* child_root_pass_sqs =
child_root_pass->shared_quad_state_list.front();
- child_root_pass_sqs->content_to_target_transform.Translate(8, 0);
+ child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
child_root_pass_sqs->is_clipped = true;
child_root_pass_sqs->clip_rect = gfx::Rect(0, 0, 5, 5);
@@ -927,7 +919,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
gfx::Rect(0, 1, 100, 7);
SharedQuadState* middle_root_pass_sqs =
middle_root_pass->shared_quad_state_list.front();
- middle_root_pass_sqs->content_to_target_transform.Scale(2, 3);
+ middle_root_pass_sqs->quad_to_target_transform.Scale(2, 3);
scoped_ptr<DelegatedFrameData> middle_frame_data(new DelegatedFrameData);
middle_pass_list.swap(middle_frame_data->render_pass_list);
@@ -956,10 +948,10 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
root_pass_list.at(0)
->shared_quad_state_list.front()
- ->content_to_target_transform.Translate(0, 7);
+ ->quad_to_target_transform.Translate(0, 7);
root_pass_list.at(0)
->shared_quad_state_list.ElementAt(1)
- ->content_to_target_transform.Translate(0, 10);
+ ->quad_to_target_transform.Translate(0, 10);
root_pass_list.at(0)->quad_list.ElementAt(1)->visible_rect =
gfx::Rect(0, 0, 8, 100);
@@ -1005,7 +997,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
gfx::Transform expected_aggregated_first_pass_sqs_transform;
expected_aggregated_first_pass_sqs_transform.Translate(5, 0);
EXPECT_EQ(expected_aggregated_first_pass_sqs_transform.ToString(),
- aggregated_first_pass_sqs->content_to_target_transform.ToString());
+ aggregated_first_pass_sqs->quad_to_target_transform.ToString());
// The first pass's transform to the root target should include the aggregated
// transform, including the transform from the child pass to the root.
@@ -1036,7 +1028,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
iter != aggregated_pass_list[1]->quad_list.cend();
++iter) {
EXPECT_EQ(expected_root_pass_quad_transforms[iter.index()].ToString(),
- iter->shared_quad_state->content_to_target_transform.ToString())
+ iter->shared_quad_state->quad_to_target_transform.ToString())
<< iter.index();
}
@@ -1073,7 +1065,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
RenderPass* child_root_pass = child_pass_list.at(0u);
SharedQuadState* child_root_pass_sqs =
child_root_pass->shared_quad_state_list.front();
- child_root_pass_sqs->content_to_target_transform.Translate(8, 0);
+ child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData);
child_pass_list.swap(child_frame_data->render_pass_list);
@@ -1100,7 +1092,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
root_pass_list.at(0)
->shared_quad_state_list.front()
- ->content_to_target_transform.Translate(0, 10);
+ ->quad_to_target_transform.Translate(0, 10);
root_pass_list.at(0)->damage_rect = gfx::Rect(5, 5, 10, 10);
root_pass_list.at(1)->damage_rect = gfx::Rect(5, 5, 100, 100);
@@ -1138,7 +1130,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
RenderPass* child_root_pass = child_pass_list.at(0u);
SharedQuadState* child_root_pass_sqs =
child_root_pass->shared_quad_state_list.front();
- child_root_pass_sqs->content_to_target_transform.Translate(8, 0);
+ child_root_pass_sqs->quad_to_target_transform.Translate(8, 0);
child_root_pass->damage_rect = gfx::Rect(10, 10, 10, 10);
scoped_ptr<DelegatedFrameData> child_frame_data(new DelegatedFrameData);
@@ -1178,7 +1170,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
root_pass_list.at(0)
->shared_quad_state_list.front()
- ->content_to_target_transform.Translate(0, 10);
+ ->quad_to_target_transform.Translate(0, 10);
root_pass_list.at(0)->damage_rect = gfx::Rect(0, 0, 1, 1);
scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
@@ -1200,7 +1192,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
root_pass_list.at(0)
->shared_quad_state_list.front()
- ->content_to_target_transform.Translate(0, 10);
+ ->quad_to_target_transform.Translate(0, 10);
root_pass_list.at(0)->damage_rect = gfx::Rect(1, 1, 1, 1);
scoped_ptr<DelegatedFrameData> root_frame_data(new DelegatedFrameData);
« no previous file with comments | « cc/surfaces/surface_aggregator_test_helpers.cc ('k') | cc/surfaces/surfaces_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698