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

Side by Side Diff: cc/surfaces/surface_aggregator_perftest.cc

Issue 1142343008: cc: Rework overlays to not use the ResourceProvider and pass texture size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests 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 unified diff | Download patch
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const gfx::Rect visible_rect(0, 0, 1, 1); 63 const gfx::Rect visible_rect(0, 0, 1, 1);
64 bool needs_blending = false; 64 bool needs_blending = false;
65 bool premultiplied_alpha = false; 65 bool premultiplied_alpha = false;
66 const gfx::PointF uv_top_left; 66 const gfx::PointF uv_top_left;
67 const gfx::PointF uv_bottom_right; 67 const gfx::PointF uv_bottom_right;
68 SkColor background_color = SK_ColorGREEN; 68 SkColor background_color = SK_ColorGREEN;
69 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f}; 69 const float vertex_opacity[4] = {0.f, 0.f, 1.f, 1.f};
70 bool flipped = false; 70 bool flipped = false;
71 bool nearest_neighbor = false; 71 bool nearest_neighbor = false;
72 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, j, 72 quad->SetAll(sqs, rect, opaque_rect, visible_rect, needs_blending, j,
73 premultiplied_alpha, uv_top_left, uv_bottom_right, 73 gfx::Size(), false, premultiplied_alpha, uv_top_left,
74 background_color, vertex_opacity, flipped, 74 uv_bottom_right, background_color, vertex_opacity, flipped,
75 nearest_neighbor); 75 nearest_neighbor);
76 } 76 }
77 sqs = pass->CreateAndAppendSharedQuadState(); 77 sqs = pass->CreateAndAppendSharedQuadState();
78 sqs->opacity = opacity; 78 sqs->opacity = opacity;
79 if (i > 1) { 79 if (i > 1) {
80 SurfaceDrawQuad* surface_quad = 80 SurfaceDrawQuad* surface_quad =
81 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); 81 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
82 surface_quad->SetNew(sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1), 82 surface_quad->SetNew(sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1),
83 SurfaceId(i - 1)); 83 SurfaceId(i - 1));
84 } 84 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 TEST_F(SurfaceAggregatorPerfTest, ManySurfacesTransparent) { 123 TEST_F(SurfaceAggregatorPerfTest, ManySurfacesTransparent) {
124 RunTest(20, 100, .5f, "many_surfaces_transparent"); 124 RunTest(20, 100, .5f, "many_surfaces_transparent");
125 } 125 }
126 126
127 TEST_F(SurfaceAggregatorPerfTest, FewSurfaces) { 127 TEST_F(SurfaceAggregatorPerfTest, FewSurfaces) {
128 RunTest(3, 1000, 1.f, "few_surfaces"); 128 RunTest(3, 1000, 1.f, "few_surfaces");
129 } 129 }
130 130
131 } // namespace 131 } // namespace
132 } // namespace cc 132 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698