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

Side by Side Diff: cc/surfaces/surface_aggregator_test_helpers.h

Issue 139763003: Initial surface aggregator implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment to SharedQuadState Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/surfaces/surface_aggregator_test_helpers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_SURFACES_SURFACE_AGGREGATOR_TEST_HELPERS_H_
6 #define CC_SURFACES_SURFACE_AGGREGATOR_TEST_HELPERS_H_
7
8 #include "cc/quads/render_pass.h"
9 #include "ui/gfx/size.h"
10
11 namespace cc {
12
13 class Surface;
14 class TestRenderPass;
15
16 namespace test {
17
18 struct Quad {
19 Quad(char type, int data) : type(type), data(data), size(gfx::Size(5, 5)) {}
20
21 Quad(char type, int data, const gfx::Size& size)
22 : type(type), data(data), size(size) {}
23
24 char type;
25 int data; // surface_id for type=='S', color for type=='C'
jamesr 2014/01/22 23:06:02 turns out this is too simple for anything useful,
26 gfx::Size size;
27 };
28
29 struct Pass {
30 Pass(Quad* quads, size_t quad_count) : quads(quads), quad_count(quad_count) {}
31
32 Quad* quads;
33 size_t quad_count;
34 };
35
36 void AddSurfaceQuad(TestRenderPass* pass,
37 const gfx::Size& surface_size,
38 int surface_id);
39
40 void AddQuadInPass(TestRenderPass* pass, Quad desc);
41
42 void AddPasses(RenderPassList* pass_list,
43 const gfx::Rect& output_rect,
44 Pass* passes,
45 size_t pass_count);
46
47 void TestPassMatchesExpectations(RenderPass* pass, Pass expected_pass);
48
49 void TestPassesMatchExpectations(RenderPassList* passes,
50 Pass* expected_passes,
51 size_t expected_pass_count);
52
53 void SubmitFrame(Pass* passes, size_t pass_count, Surface* surface);
54
55 } // namespace test
56 } // namespace cc
57
58 #endif // CC_SURFACES_SURFACE_AGGREGATOR_TEST_HELPERS_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/surfaces/surface_aggregator_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698