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

Side by Side Diff: cc/test/compositor_frame_helpers.cc

Issue 2855723002: Don't submit frames with no render passes in cc tests (Closed)
Patch Set: c Created 3 years, 7 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
« no previous file with comments | « cc/test/compositor_frame_helpers.h ('k') | cc/test/fake_compositor_frame_sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/test/compositor_frame_helpers.h" 5 #include "cc/test/compositor_frame_helpers.h"
6 #include "cc/output/compositor_frame.h" 6 #include "cc/output/compositor_frame.h"
7 7
8 namespace cc { 8 namespace cc {
9 namespace test { 9 namespace test {
10 10
11 CompositorFrame MakeCompositorFrame() { 11 CompositorFrame MakeCompositorFrame() {
12 CompositorFrame frame = MakeEmptyCompositorFrame();
13 std::unique_ptr<RenderPass> pass = RenderPass::Create();
14 pass->SetNew(1, gfx::Rect(0, 0, 20, 20), gfx::Rect(), gfx::Transform());
15 frame.render_pass_list.push_back(std::move(pass));
16 return frame;
17 }
18
19 CompositorFrame MakeEmptyCompositorFrame() {
12 CompositorFrame frame; 20 CompositorFrame frame;
13 frame.metadata.begin_frame_ack.source_id = BeginFrameArgs::kManualSourceId; 21 frame.metadata.begin_frame_ack.source_id = BeginFrameArgs::kManualSourceId;
14 frame.metadata.begin_frame_ack.sequence_number = 22 frame.metadata.begin_frame_ack.sequence_number =
15 BeginFrameArgs::kStartingFrameNumber; 23 BeginFrameArgs::kStartingFrameNumber;
24 frame.metadata.device_scale_factor = 1;
16 return frame; 25 return frame;
17 } 26 }
18 27
19 } // namespace test 28 } // namespace test
20 } // namespace cc 29 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/compositor_frame_helpers.h ('k') | cc/test/fake_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698