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

Unified Diff: cc/test/surface_hittest_test_helpers.h

Issue 1422783002: cc: Move surfaces hittesting test helpers out to a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN DEPS I hope Created 5 years, 2 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.cc ('k') | cc/test/surface_hittest_test_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/surface_hittest_test_helpers.h
diff --git a/cc/test/surface_hittest_test_helpers.h b/cc/test/surface_hittest_test_helpers.h
new file mode 100644
index 0000000000000000000000000000000000000000..be4ad2e29d7f462c45a47dcf505e7e0c17df659f
--- /dev/null
+++ b/cc/test/surface_hittest_test_helpers.h
@@ -0,0 +1,66 @@
+// Copyright 2015 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_TEST_SURFACE_HITTEST_TEST_HELPERS_H_
+#define CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/quads/render_pass.h"
+#include "cc/surfaces/surface_factory_client.h"
+
+namespace gfx {
+class Transform;
+}
+
+namespace cc {
+
+class CompositorFrame;
+class RenderPassDrawQuad;
+class SolidColorDrawQuad;
+
+namespace test {
+
+class EmptySurfaceFactoryClient : public SurfaceFactoryClient {
+ public:
+ void ReturnResources(const ReturnedResourceArray& resources) override {}
+ void SetBeginFrameSource(SurfaceId surface_id,
+ BeginFrameSource* begin_frame_source) override {}
+};
+
+void CreateSharedQuadState(RenderPass* pass,
+ const gfx::Transform& transform,
+ const gfx::Rect& root_rect);
+
+void CreateSolidColorDrawQuad(RenderPass* pass,
+ const gfx::Transform& transform,
+ const gfx::Rect& root_rect,
+ const gfx::Rect& quad_rect);
+
+void CreateRenderPassDrawQuad(RenderPass* pass,
+ const gfx::Transform& transform,
+ const gfx::Rect& root_rect,
+ const gfx::Rect& quad_rect,
+ const RenderPassId& render_pass_id);
+
+void CreateSurfaceDrawQuad(RenderPass* pass,
+ const gfx::Transform& transform,
+ const gfx::Rect& root_rect,
+ const gfx::Rect& quad_rect,
+ SurfaceId surface_id);
+
+void CreateRenderPass(const RenderPassId& render_pass_id,
+ const gfx::Rect& rect,
+ const gfx::Transform& transform_to_root_target,
+ RenderPassList* render_pass_list);
+
+scoped_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList(
+ RenderPassList* render_pass_list);
+
+scoped_ptr<CompositorFrame> CreateCompositorFrame(const gfx::Rect& root_rect,
+ RenderPass** render_pass);
+
+} // namespace test
+} // namespace cc
+
+#endif // CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_
« no previous file with comments | « cc/test/surface_aggregator_test_helpers.cc ('k') | cc/test/surface_hittest_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698