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

Unified Diff: cc/test/fake_compositor_frame_sink_support_client.h

Issue 2795683003: [cc]Replace use of SurfaceFactory with CompositorFrameSinkSupport in tests (Closed)
Patch Set: Update returned_resources_ in FakeCompositorFrameSinkSupportClient::DidReceiveCompositorFrameAck Created 3 years, 8 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/surfaces_pixeltest.cc ('k') | cc/test/fake_compositor_frame_sink_support_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_compositor_frame_sink_support_client.h
diff --git a/cc/test/fake_compositor_frame_sink_support_client.h b/cc/test/fake_compositor_frame_sink_support_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..444315f816ccf2a515ffc1e18af616f9e84c62ef
--- /dev/null
+++ b/cc/test/fake_compositor_frame_sink_support_client.h
@@ -0,0 +1,46 @@
+// Copyright 2017 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_FAKE_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
+#define CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
+
+#include "cc/surfaces/compositor_frame_sink_support_client.h"
+#include "cc/surfaces/local_surface_id.h"
+#include "ui/gfx/geometry/rect.h"
+
+namespace cc {
+
+class FakeCompositorFrameSinkSupportClient
+ : public CompositorFrameSinkSupportClient {
+ public:
+ FakeCompositorFrameSinkSupportClient();
+ ~FakeCompositorFrameSinkSupportClient() override;
+
+ // CompositorFrameSinkSupportClient implementation.
+ void DidReceiveCompositorFrameAck(
+ const ReturnedResourceArray& resources) override;
+ void OnBeginFrame(const BeginFrameArgs& args) override;
+ void ReclaimResources(const ReturnedResourceArray& resources) override;
+ void WillDrawSurface(const LocalSurfaceId& local_surface_id,
+ const gfx::Rect& damage_rect) override;
+
+ const gfx::Rect& last_damage_rect() const { return last_damage_rect_; }
+ const LocalSurfaceId& last_local_surface_id() const {
+ return last_local_surface_id_;
+ }
+ const ReturnedResourceArray& returned_resources() const {
+ return returned_resources_;
+ }
+
+ private:
+ gfx::Rect last_damage_rect_;
+ LocalSurfaceId last_local_surface_id_;
+ ReturnedResourceArray returned_resources_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeCompositorFrameSinkSupportClient);
+};
+
+} // namespace cc
+
+#endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
« no previous file with comments | « cc/surfaces/surfaces_pixeltest.cc ('k') | cc/test/fake_compositor_frame_sink_support_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698