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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/surfaces/surface_aggregator_test_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator_test_helpers.h
diff --git a/cc/surfaces/surface_aggregator_test_helpers.h b/cc/surfaces/surface_aggregator_test_helpers.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d4ee36e1df12848d4dfd55fe9bfb2391d0f70c2
--- /dev/null
+++ b/cc/surfaces/surface_aggregator_test_helpers.h
@@ -0,0 +1,58 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_SURFACES_SURFACE_AGGREGATOR_TEST_HELPERS_H_
+#define CC_SURFACES_SURFACE_AGGREGATOR_TEST_HELPERS_H_
+
+#include "cc/quads/render_pass.h"
+#include "ui/gfx/size.h"
+
+namespace cc {
+
+class Surface;
+class TestRenderPass;
+
+namespace test {
+
+struct Quad {
+ Quad(char type, int data) : type(type), data(data), size(gfx::Size(5, 5)) {}
+
+ Quad(char type, int data, const gfx::Size& size)
+ : type(type), data(data), size(size) {}
+
+ char type;
+ 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,
+ gfx::Size size;
+};
+
+struct Pass {
+ Pass(Quad* quads, size_t quad_count) : quads(quads), quad_count(quad_count) {}
+
+ Quad* quads;
+ size_t quad_count;
+};
+
+void AddSurfaceQuad(TestRenderPass* pass,
+ const gfx::Size& surface_size,
+ int surface_id);
+
+void AddQuadInPass(TestRenderPass* pass, Quad desc);
+
+void AddPasses(RenderPassList* pass_list,
+ const gfx::Rect& output_rect,
+ Pass* passes,
+ size_t pass_count);
+
+void TestPassMatchesExpectations(RenderPass* pass, Pass expected_pass);
+
+void TestPassesMatchExpectations(RenderPassList* passes,
+ Pass* expected_passes,
+ size_t expected_pass_count);
+
+void SubmitFrame(Pass* passes, size_t pass_count, Surface* surface);
+
+} // namespace test
+} // namespace cc
+
+#endif // CC_SURFACES_SURFACE_AGGREGATOR_TEST_HELPERS_H_
« 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