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

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

Issue 2914023002: Remove LatencyInfo::sequence_number. (May break metrics).
Patch Set: Rebase Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "cc/input/selection.h" 9 #include "cc/input/selection.h"
10 #include "cc/ipc/copy_output_request_struct_traits.h" 10 #include "cc/ipc/copy_output_request_struct_traits.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 gfx::PointF(5432.1f, 1987.6f)); 357 gfx::PointF(5432.1f, 1987.6f));
358 selection.start.set_visible(true); 358 selection.start.set_visible(true);
359 selection.start.set_type(gfx::SelectionBound::CENTER); 359 selection.start.set_type(gfx::SelectionBound::CENTER);
360 selection.end.SetEdge(gfx::PointF(1337.5f, 52124.f), 360 selection.end.SetEdge(gfx::PointF(1337.5f, 52124.f),
361 gfx::PointF(1234.3f, 8765.6f)); 361 gfx::PointF(1234.3f, 8765.6f));
362 selection.end.set_visible(false); 362 selection.end.set_visible(false);
363 selection.end.set_type(gfx::SelectionBound::RIGHT); 363 selection.end.set_type(gfx::SelectionBound::RIGHT);
364 ui::LatencyInfo latency_info; 364 ui::LatencyInfo latency_info;
365 latency_info.set_trace_id(5); 365 latency_info.set_trace_id(5);
366 latency_info.AddLatencyNumber( 366 latency_info.AddLatencyNumber(
367 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337, 7331); 367 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337);
368 std::vector<ui::LatencyInfo> latency_infos = {latency_info}; 368 std::vector<ui::LatencyInfo> latency_infos = {latency_info};
369 std::vector<SurfaceId> referenced_surfaces; 369 std::vector<SurfaceId> referenced_surfaces;
370 SurfaceId id(FrameSinkId(1234, 4321), 370 SurfaceId id(FrameSinkId(1234, 4321),
371 LocalSurfaceId(5678, base::UnguessableToken::Create())); 371 LocalSurfaceId(5678, base::UnguessableToken::Create()));
372 referenced_surfaces.push_back(id); 372 referenced_surfaces.push_back(id);
373 std::vector<SurfaceId> activation_dependencies; 373 std::vector<SurfaceId> activation_dependencies;
374 SurfaceId id2(FrameSinkId(4321, 1234), 374 SurfaceId id2(FrameSinkId(4321, 1234),
375 LocalSurfaceId(8765, base::UnguessableToken::Create())); 375 LocalSurfaceId(8765, base::UnguessableToken::Create()));
376 activation_dependencies.push_back(id2); 376 activation_dependencies.push_back(id2);
377 uint32_t frame_token = 0xdeadbeef; 377 uint32_t frame_token = 0xdeadbeef;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 EXPECT_EQ(top_bar_shown_ratio, output.top_controls_shown_ratio); 421 EXPECT_EQ(top_bar_shown_ratio, output.top_controls_shown_ratio);
422 EXPECT_EQ(bottom_bar_height, output.bottom_controls_height); 422 EXPECT_EQ(bottom_bar_height, output.bottom_controls_height);
423 EXPECT_EQ(bottom_bar_shown_ratio, output.bottom_controls_shown_ratio); 423 EXPECT_EQ(bottom_bar_shown_ratio, output.bottom_controls_shown_ratio);
424 EXPECT_EQ(root_background_color, output.root_background_color); 424 EXPECT_EQ(root_background_color, output.root_background_color);
425 EXPECT_EQ(selection, output.selection); 425 EXPECT_EQ(selection, output.selection);
426 EXPECT_EQ(latency_infos.size(), output.latency_info.size()); 426 EXPECT_EQ(latency_infos.size(), output.latency_info.size());
427 ui::LatencyInfo::LatencyComponent component; 427 ui::LatencyInfo::LatencyComponent component;
428 EXPECT_TRUE(output.latency_info[0].FindLatency( 428 EXPECT_TRUE(output.latency_info[0].FindLatency(
429 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337, 429 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337,
430 &component)); 430 &component));
431 EXPECT_EQ(7331, component.sequence_number);
432 EXPECT_EQ(referenced_surfaces.size(), output.referenced_surfaces.size()); 431 EXPECT_EQ(referenced_surfaces.size(), output.referenced_surfaces.size());
433 for (uint32_t i = 0; i < referenced_surfaces.size(); ++i) 432 for (uint32_t i = 0; i < referenced_surfaces.size(); ++i)
434 EXPECT_EQ(referenced_surfaces[i], output.referenced_surfaces[i]); 433 EXPECT_EQ(referenced_surfaces[i], output.referenced_surfaces[i]);
435 EXPECT_EQ(activation_dependencies.size(), 434 EXPECT_EQ(activation_dependencies.size(),
436 output.activation_dependencies.size()); 435 output.activation_dependencies.size());
437 for (uint32_t i = 0; i < activation_dependencies.size(); ++i) 436 for (uint32_t i = 0; i < activation_dependencies.size(); ++i)
438 EXPECT_EQ(activation_dependencies[i], output.activation_dependencies[i]); 437 EXPECT_EQ(activation_dependencies[i], output.activation_dependencies[i]);
439 EXPECT_EQ(frame_token, output.frame_token); 438 EXPECT_EQ(frame_token, output.frame_token);
440 EXPECT_EQ(begin_frame_ack_sequence_number, 439 EXPECT_EQ(begin_frame_ack_sequence_number,
441 output.begin_frame_ack.sequence_number); 440 output.begin_frame_ack.sequence_number);
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 EXPECT_EQ(v_plane_resource_id, out_quad->v_plane_resource_id()); 1247 EXPECT_EQ(v_plane_resource_id, out_quad->v_plane_resource_id());
1249 EXPECT_EQ(a_plane_resource_id, out_quad->a_plane_resource_id()); 1248 EXPECT_EQ(a_plane_resource_id, out_quad->a_plane_resource_id());
1250 EXPECT_EQ(color_space, out_quad->color_space); 1249 EXPECT_EQ(color_space, out_quad->color_space);
1251 EXPECT_EQ(resource_offset, out_quad->resource_offset); 1250 EXPECT_EQ(resource_offset, out_quad->resource_offset);
1252 EXPECT_EQ(resource_multiplier, out_quad->resource_multiplier); 1251 EXPECT_EQ(resource_multiplier, out_quad->resource_multiplier);
1253 EXPECT_EQ(bits_per_channel, out_quad->bits_per_channel); 1252 EXPECT_EQ(bits_per_channel, out_quad->bits_per_channel);
1254 EXPECT_EQ(require_overlay, out_quad->require_overlay); 1253 EXPECT_EQ(require_overlay, out_quad->require_overlay);
1255 } 1254 }
1256 1255
1257 } // namespace cc 1256 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/latency_info_swap_promise.cc » ('j') | cc/trees/latency_info_swap_promise_monitor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698