| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/debug/lap_timer.h" | 5 #include "cc/debug/lap_timer.h" |
| 6 #include "cc/output/compositor_frame.h" | 6 #include "cc/output/compositor_frame.h" |
| 7 #include "cc/output/delegated_frame_data.h" | 7 #include "cc/output/delegated_frame_data.h" |
| 8 #include "cc/quads/surface_draw_quad.h" | 8 #include "cc/quads/surface_draw_quad.h" |
| 9 #include "cc/quads/texture_draw_quad.h" | 9 #include "cc/quads/texture_draw_quad.h" |
| 10 #include "cc/surfaces/surface_aggregator.h" | 10 #include "cc/surfaces/surface_aggregator.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 j % 2 == 0 ? gfx::Rect(0, 0, 1, 1) : gfx::Rect(1, 1, 1, 1); | 67 j % 2 == 0 ? gfx::Rect(0, 0, 1, 1) : gfx::Rect(1, 1, 1, 1); |
| 68 bool needs_blending = false; | 68 bool needs_blending = false; |
| 69 bool premultiplied_alpha = false; | 69 bool premultiplied_alpha = false; |
| 70 const gfx::PointF uv_top_left; | 70 const gfx::PointF uv_top_left; |
| 71 const gfx::PointF uv_bottom_right; | 71 const gfx::PointF uv_bottom_right; |
| 72 SkColor background_color = SK_ColorGREEN; | 72 SkColor background_color = SK_ColorGREEN; |
| 73 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; | 73 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; |
| 74 bool flipped = false; | 74 bool flipped = false; |
| 75 bool nearest_neighbor = false; | 75 bool nearest_neighbor = false; |
| 76 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, j, | 76 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, j, |
| 77 gfx::Size(), false, premultiplied_alpha, uv_top_left, | 77 gfx::Size(), premultiplied_alpha, uv_top_left, |
| 78 uv_bottom_right, background_color, vertex_opacity, flipped, | 78 uv_bottom_right, background_color, vertex_opacity, flipped, |
| 79 nearest_neighbor); | 79 nearest_neighbor); |
| 80 } | 80 } |
| 81 sqs = pass->CreateAndAppendSharedQuadState(); | 81 sqs = pass->CreateAndAppendSharedQuadState(); |
| 82 sqs->opacity = opacity; | 82 sqs->opacity = opacity; |
| 83 if (i > 1) { | 83 if (i > 1) { |
| 84 SurfaceDrawQuad* surface_quad = | 84 SurfaceDrawQuad* surface_quad = |
| 85 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); | 85 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); |
| 86 surface_quad->SetNew(sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), | 86 surface_quad->SetNew(sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), |
| 87 SurfaceId(i - 1)); | 87 SurfaceId(i - 1)); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) { | 165 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) { |
| 166 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc"); | 166 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc"); |
| 167 } | 167 } |
| 168 | 168 |
| 169 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) { | 169 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) { |
| 170 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged"); | 170 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged"); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace | 173 } // namespace |
| 174 } // namespace cc | 174 } // namespace cc |
| OLD | NEW |