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

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

Issue 2914023002: Remove LatencyInfo::sequence_number. (May break metrics).
Patch Set: Fix Windows. 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 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 selection.start.SetEdge(gfx::PointF(1234.5f, 67891.f), 354 selection.start.SetEdge(gfx::PointF(1234.5f, 67891.f),
355 gfx::PointF(5432.1f, 1987.6f)); 355 gfx::PointF(5432.1f, 1987.6f));
356 selection.start.set_visible(true); 356 selection.start.set_visible(true);
357 selection.start.set_type(gfx::SelectionBound::CENTER); 357 selection.start.set_type(gfx::SelectionBound::CENTER);
358 selection.end.SetEdge(gfx::PointF(1337.5f, 52124.f), 358 selection.end.SetEdge(gfx::PointF(1337.5f, 52124.f),
359 gfx::PointF(1234.3f, 8765.6f)); 359 gfx::PointF(1234.3f, 8765.6f));
360 selection.end.set_visible(false); 360 selection.end.set_visible(false);
361 selection.end.set_type(gfx::SelectionBound::RIGHT); 361 selection.end.set_type(gfx::SelectionBound::RIGHT);
362 ui::LatencyInfo latency_info; 362 ui::LatencyInfo latency_info;
363 latency_info.AddLatencyNumber( 363 latency_info.AddLatencyNumber(
364 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337, 7331); 364 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337);
365 std::vector<ui::LatencyInfo> latency_infos = {latency_info}; 365 std::vector<ui::LatencyInfo> latency_infos = {latency_info};
366 std::vector<SurfaceId> referenced_surfaces; 366 std::vector<SurfaceId> referenced_surfaces;
367 SurfaceId id(FrameSinkId(1234, 4321), 367 SurfaceId id(FrameSinkId(1234, 4321),
368 LocalSurfaceId(5678, base::UnguessableToken::Create())); 368 LocalSurfaceId(5678, base::UnguessableToken::Create()));
369 referenced_surfaces.push_back(id); 369 referenced_surfaces.push_back(id);
370 std::vector<SurfaceId> activation_dependencies; 370 std::vector<SurfaceId> activation_dependencies;
371 SurfaceId id2(FrameSinkId(4321, 1234), 371 SurfaceId id2(FrameSinkId(4321, 1234),
372 LocalSurfaceId(8765, base::UnguessableToken::Create())); 372 LocalSurfaceId(8765, base::UnguessableToken::Create()));
373 activation_dependencies.push_back(id2); 373 activation_dependencies.push_back(id2);
374 uint32_t frame_token = 0xdeadbeef; 374 uint32_t frame_token = 0xdeadbeef;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 EXPECT_EQ(top_bar_shown_ratio, output.top_controls_shown_ratio); 418 EXPECT_EQ(top_bar_shown_ratio, output.top_controls_shown_ratio);
419 EXPECT_EQ(bottom_bar_height, output.bottom_controls_height); 419 EXPECT_EQ(bottom_bar_height, output.bottom_controls_height);
420 EXPECT_EQ(bottom_bar_shown_ratio, output.bottom_controls_shown_ratio); 420 EXPECT_EQ(bottom_bar_shown_ratio, output.bottom_controls_shown_ratio);
421 EXPECT_EQ(root_background_color, output.root_background_color); 421 EXPECT_EQ(root_background_color, output.root_background_color);
422 EXPECT_EQ(selection, output.selection); 422 EXPECT_EQ(selection, output.selection);
423 EXPECT_EQ(latency_infos.size(), output.latency_info.size()); 423 EXPECT_EQ(latency_infos.size(), output.latency_info.size());
424 ui::LatencyInfo::LatencyComponent component; 424 ui::LatencyInfo::LatencyComponent component;
425 EXPECT_TRUE(output.latency_info[0].FindLatency( 425 EXPECT_TRUE(output.latency_info[0].FindLatency(
426 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337, 426 ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, 1337,
427 &component)); 427 &component));
428 EXPECT_EQ(7331, component.sequence_number);
429 EXPECT_EQ(referenced_surfaces.size(), output.referenced_surfaces.size()); 428 EXPECT_EQ(referenced_surfaces.size(), output.referenced_surfaces.size());
430 for (uint32_t i = 0; i < referenced_surfaces.size(); ++i) 429 for (uint32_t i = 0; i < referenced_surfaces.size(); ++i)
431 EXPECT_EQ(referenced_surfaces[i], output.referenced_surfaces[i]); 430 EXPECT_EQ(referenced_surfaces[i], output.referenced_surfaces[i]);
432 EXPECT_EQ(activation_dependencies.size(), 431 EXPECT_EQ(activation_dependencies.size(),
433 output.activation_dependencies.size()); 432 output.activation_dependencies.size());
434 for (uint32_t i = 0; i < activation_dependencies.size(); ++i) 433 for (uint32_t i = 0; i < activation_dependencies.size(); ++i)
435 EXPECT_EQ(activation_dependencies[i], output.activation_dependencies[i]); 434 EXPECT_EQ(activation_dependencies[i], output.activation_dependencies[i]);
436 EXPECT_EQ(frame_token, output.frame_token); 435 EXPECT_EQ(frame_token, output.frame_token);
437 EXPECT_EQ(begin_frame_ack_sequence_number, 436 EXPECT_EQ(begin_frame_ack_sequence_number,
438 output.begin_frame_ack.sequence_number); 437 output.begin_frame_ack.sequence_number);
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 EXPECT_EQ(u_plane_resource_id, out_quad->u_plane_resource_id()); 1241 EXPECT_EQ(u_plane_resource_id, out_quad->u_plane_resource_id());
1243 EXPECT_EQ(v_plane_resource_id, out_quad->v_plane_resource_id()); 1242 EXPECT_EQ(v_plane_resource_id, out_quad->v_plane_resource_id());
1244 EXPECT_EQ(a_plane_resource_id, out_quad->a_plane_resource_id()); 1243 EXPECT_EQ(a_plane_resource_id, out_quad->a_plane_resource_id());
1245 EXPECT_EQ(color_space, out_quad->color_space); 1244 EXPECT_EQ(color_space, out_quad->color_space);
1246 EXPECT_EQ(resource_offset, out_quad->resource_offset); 1245 EXPECT_EQ(resource_offset, out_quad->resource_offset);
1247 EXPECT_EQ(resource_multiplier, out_quad->resource_multiplier); 1246 EXPECT_EQ(resource_multiplier, out_quad->resource_multiplier);
1248 EXPECT_EQ(bits_per_channel, out_quad->bits_per_channel); 1247 EXPECT_EQ(bits_per_channel, out_quad->bits_per_channel);
1249 } 1248 }
1250 1249
1251 } // namespace cc 1250 } // 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