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

Side by Side Diff: components/exo/surface_unittest.cc

Issue 2779633002: [cc] Remove remaining_frames from BeginFrameAck. (Closed)
Patch Set: Created 3 years, 8 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/surfaces/surface.h" 5 #include "cc/surfaces/surface.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
10 #include "cc/test/begin_frame_args_test.h" 10 #include "cc/test/begin_frame_args_test.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 cc::BeginFrameArgs args(source.CreateBeginFrameArgs(BEGINFRAME_FROM_HERE)); 336 cc::BeginFrameArgs args(source.CreateBeginFrameArgs(BEGINFRAME_FROM_HERE));
337 args.frame_time = base::TimeTicks::FromInternalValue(100); 337 args.frame_time = base::TimeTicks::FromInternalValue(100);
338 source.TestOnBeginFrame(args); // Runs the frame callback. 338 source.TestOnBeginFrame(args); // Runs the frame callback.
339 EXPECT_EQ(args.frame_time, frame_time); 339 EXPECT_EQ(args.frame_time, frame_time);
340 340
341 surface->Commit(); // Acknowledges the BeginFrame. 341 surface->Commit(); // Acknowledges the BeginFrame.
342 RunAllPendingInMessageLoop(); 342 RunAllPendingInMessageLoop();
343 343
344 cc::BeginFrameAck expected_ack(args.source_id, args.sequence_number, 344 cc::BeginFrameAck expected_ack(args.source_id, args.sequence_number,
345 args.sequence_number, 0, true); 345 args.sequence_number, true);
346 EXPECT_EQ(expected_ack, source.LastAckForObserver(surface.get())); 346 EXPECT_EQ(expected_ack, source.LastAckForObserver(surface.get()));
347 347
348 const cc::CompositorFrame& frame = GetFrameFromSurface(surface.get()); 348 const cc::CompositorFrame& frame = GetFrameFromSurface(surface.get());
349 EXPECT_EQ(expected_ack, frame.metadata.begin_frame_ack); 349 EXPECT_EQ(expected_ack, frame.metadata.begin_frame_ack);
350 } 350 }
351 351
352 } // namespace 352 } // namespace
353 } // namespace exo 353 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/surface.cc ('k') | content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698