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

Side by Side Diff: cc/render_pass_unittest.cc

Issue 12328098: cc: Moving anti-aliasing decision to parent compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@solidaa
Patch Set: Rebase to tip of tree Created 7 years, 9 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 unified diff | Download patch
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | cc/render_surface_impl.cc » ('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/render_pass.h" 5 #include "cc/render_pass.h"
6 6
7 #include "cc/checkerboard_draw_quad.h" 7 #include "cc/checkerboard_draw_quad.h"
8 #include "cc/math_util.h" 8 #include "cc/math_util.h"
9 #include "cc/test/geometry_test_utils.h" 9 #include "cc/test/geometry_test_utils.h"
10 #include "cc/test/render_pass_test_common.h" 10 #include "cc/test/render_pass_test_common.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); 42 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create();
43 pass->SetAll(id, 43 pass->SetAll(id,
44 outputRect, 44 outputRect,
45 damageRect, 45 damageRect,
46 transformToRoot, 46 transformToRoot,
47 hasTransparentBackground, 47 hasTransparentBackground,
48 hasOcclusionFromOutsideTargetSurface); 48 hasOcclusionFromOutsideTargetSurface);
49 49
50 // Stick a quad in the pass, this should not get copied. 50 // Stick a quad in the pass, this should not get copied.
51 scoped_ptr<SharedQuadState> sharedState = SharedQuadState::Create(); 51 scoped_ptr<SharedQuadState> sharedState = SharedQuadState::Create();
52 sharedState->SetAll(gfx::Transform(), gfx::Rect(), gfx::Rect(), false, 1); 52 sharedState->SetAll(gfx::Transform(), gfx::Size(), gfx::Rect(), gfx::Rect(), false, 1);
53 pass->AppendSharedQuadState(sharedState.Pass()); 53 pass->AppendSharedQuadState(sharedState.Pass());
54 54
55 scoped_ptr<CheckerboardDrawQuad> checkerboardQuad = CheckerboardDrawQuad::Cr eate(); 55 scoped_ptr<CheckerboardDrawQuad> checkerboardQuad = CheckerboardDrawQuad::Cr eate();
56 checkerboardQuad->SetNew(pass->shared_quad_state_list.back(), gfx::Rect(), S kColor()); 56 checkerboardQuad->SetNew(pass->shared_quad_state_list.back(), gfx::Rect(), S kColor());
57 pass->quad_list.push_back(checkerboardQuad.PassAs<DrawQuad>()); 57 pass->quad_list.push_back(checkerboardQuad.PassAs<DrawQuad>());
58 58
59 RenderPass::Id newId(63, 4); 59 RenderPass::Id newId(63, 4);
60 60
61 scoped_ptr<RenderPass> copy = pass->Copy(newId); 61 scoped_ptr<RenderPass> copy = pass->Copy(newId);
62 EXPECT_EQ(newId, copy->id); 62 EXPECT_EQ(newId, copy->id);
63 EXPECT_RECT_EQ(pass->output_rect, copy->output_rect); 63 EXPECT_RECT_EQ(pass->output_rect, copy->output_rect);
64 EXPECT_EQ(pass->transform_to_root_target, copy->transform_to_root_target); 64 EXPECT_EQ(pass->transform_to_root_target, copy->transform_to_root_target);
65 EXPECT_RECT_EQ(pass->damage_rect, copy->damage_rect); 65 EXPECT_RECT_EQ(pass->damage_rect, copy->damage_rect);
66 EXPECT_EQ(pass->has_transparent_background, copy->has_transparent_background ); 66 EXPECT_EQ(pass->has_transparent_background, copy->has_transparent_background );
67 EXPECT_EQ(pass->has_occlusion_from_outside_target_surface, copy->has_occlusi on_from_outside_target_surface); 67 EXPECT_EQ(pass->has_occlusion_from_outside_target_surface, copy->has_occlusi on_from_outside_target_surface);
68 EXPECT_EQ(0u, copy->quad_list.size()); 68 EXPECT_EQ(0u, copy->quad_list.size());
69 69
70 EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass)); 70 EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass));
71 } 71 }
72 72
73 } // namespace 73 } // namespace
74 } // namespace cc 74 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_layer_impl.cc ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698