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

Unified Diff: cc/test/surface_aggregator_test_helpers.cc

Issue 1496103002: Reusing base::IdType<...> to implement SurfaceId. Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: Rebasing + dusting off... Created 4 years, 10 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/test/surface_aggregator_test_helpers.h ('k') | components/html_viewer/html_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/surface_aggregator_test_helpers.cc
diff --git a/cc/test/surface_aggregator_test_helpers.cc b/cc/test/surface_aggregator_test_helpers.cc
index 2b0aff51fb88a283eccfc9fe1e932b50fb9bcb6d..3a47ab354551b1ead008adb84dc72a58d8c780ed 100644
--- a/cc/test/surface_aggregator_test_helpers.cc
+++ b/cc/test/surface_aggregator_test_helpers.cc
@@ -23,6 +23,34 @@
namespace cc {
namespace test {
+Quad::Quad()
+ : material(DrawQuad::INVALID), opacity(1.f), color(SK_ColorWHITE) {}
+
+// static
+Quad Quad::SolidColorQuad(SkColor color) {
+ Quad quad;
+ quad.material = DrawQuad::SOLID_COLOR;
+ quad.color = color;
+ return quad;
+}
+
+// static
+Quad Quad::SurfaceQuad(SurfaceId surface_id, float opacity) {
+ Quad quad;
+ quad.material = DrawQuad::SURFACE_CONTENT;
+ quad.opacity = opacity;
+ quad.surface_id = surface_id;
+ return quad;
+}
+
+// static
+Quad Quad::RenderPassQuad(RenderPassId id) {
+ Quad quad;
+ quad.material = DrawQuad::RENDER_PASS;
+ quad.render_pass_id = id;
+ return quad;
+}
+
void AddSurfaceQuad(RenderPass* pass,
const gfx::Size& surface_size,
float opacity,
« no previous file with comments | « cc/test/surface_aggregator_test_helpers.h ('k') | components/html_viewer/html_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698