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

Side by Side Diff: cc/ipc/cc_serialization_perftest.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Fix for comments in patch 4. Created 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <utility> 5 #include <utility>
6 6
7 #include "base/test/launcher/unit_test_launcher.h" 7 #include "base/test/launcher/unit_test_launcher.h"
8 #include "base/test/test_suite.h" 8 #include "base/test/test_suite.h"
9 #include "cc/ipc/begin_frame_args_struct_traits.h" 9 #include "cc/ipc/begin_frame_args_struct_traits.h"
10 #include "cc/ipc/cc_param_traits.h" 10 #include "cc/ipc/cc_param_traits.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 arbitrary_filters1.Append(FilterOperation::CreateReferenceFilter( 296 arbitrary_filters1.Append(FilterOperation::CreateReferenceFilter(
297 SkBlurImageFilter::Make(arbitrary_sigma, arbitrary_sigma, nullptr))); 297 SkBlurImageFilter::Make(arbitrary_sigma, arbitrary_sigma, nullptr)));
298 298
299 FilterOperations arbitrary_filters2; 299 FilterOperations arbitrary_filters2;
300 arbitrary_filters2.Append( 300 arbitrary_filters2.Append(
301 FilterOperation::CreateBrightnessFilter(arbitrary_float2)); 301 FilterOperation::CreateBrightnessFilter(arbitrary_float2));
302 302
303 std::unique_ptr<RenderPass> pass_in = RenderPass::Create(); 303 std::unique_ptr<RenderPass> pass_in = RenderPass::Create();
304 pass_in->SetAll(root_id, arbitrary_rect1, arbitrary_rect2, 304 pass_in->SetAll(root_id, arbitrary_rect1, arbitrary_rect2,
305 arbitrary_matrix1, arbitrary_filters2, arbitrary_filters1, 305 arbitrary_matrix1, arbitrary_filters2, arbitrary_filters1,
306 arbitrary_color_space, arbitrary_bool1); 306 arbitrary_color_space, arbitrary_bool1, arbitrary_bool1,
307 arbitrary_bool1, arbitrary_bool1);
307 308
308 // Texture quads 309 // Texture quads
309 for (uint32_t i = 0; i < 10; ++i) { 310 for (uint32_t i = 0; i < 10; ++i) {
310 SharedQuadState* shared_state1_in = 311 SharedQuadState* shared_state1_in =
311 pass_in->CreateAndAppendSharedQuadState(); 312 pass_in->CreateAndAppendSharedQuadState();
312 shared_state1_in->SetAll(arbitrary_matrix1, arbitrary_rect1, 313 shared_state1_in->SetAll(arbitrary_matrix1, arbitrary_rect1,
313 arbitrary_rect1, arbitrary_rect2, 314 arbitrary_rect1, arbitrary_rect2,
314 arbitrary_bool1, arbitrary_float1, 315 arbitrary_bool1, arbitrary_float1,
315 arbitrary_blend_mode1, arbitrary_context_id1); 316 arbitrary_blend_mode1, arbitrary_context_id1);
316 317
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 // Case 1: One shared quad state for all quads in one render pass. 460 // Case 1: One shared quad state for all quads in one render pass.
460 RunCompositorFrameTest("DelegatedFrame_ManyRenderPasses_10_500", 500, 10, 461 RunCompositorFrameTest("DelegatedFrame_ManyRenderPasses_10_500", 500, 10,
461 UseSingleSharedQuadState::YES); 462 UseSingleSharedQuadState::YES);
462 // Case 2: One shared quad state for each quad. 463 // Case 2: One shared quad state for each quad.
463 RunCompositorFrameTest("DelegatedFrame_ManyRenderPasses_10_500", 500, 10, 464 RunCompositorFrameTest("DelegatedFrame_ManyRenderPasses_10_500", 500, 10,
464 UseSingleSharedQuadState::NO); 465 UseSingleSharedQuadState::NO);
465 } 466 }
466 467
467 } // namespace 468 } // namespace
468 } // namespace cc 469 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698