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

Unified Diff: cc/test/empty_compositor_frame_sink_support_client.h

Issue 2795683003: [cc]Replace use of SurfaceFactory with CompositorFrameSinkSupport in tests (Closed)
Patch Set: Add EmptyCompositorFrameSinkSupportClient Class 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
Index: cc/test/empty_compositor_frame_sink_support_client.h
diff --git a/cc/test/empty_compositor_frame_sink_support_client.h b/cc/test/empty_compositor_frame_sink_support_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..6ea6c7aec80df4d80fbdc7332f29380105a21729
--- /dev/null
+++ b/cc/test/empty_compositor_frame_sink_support_client.h
@@ -0,0 +1,44 @@
+// 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_EMPTY_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
+#define CC_TEST_EMPTY_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 EmptyCompositorFrameSinkSupportClient
+ : public CompositorFrameSinkSupportClient {
+ public:
+ EmptyCompositorFrameSinkSupportClient();
+ ~EmptyCompositorFrameSinkSupportClient() 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:
+ // CompositorFrameSinkSupportClient implementation.
Fady Samuel 2017/04/05 21:32:42 cc/ OWNERS prefer to keep this public.
Alex Z. 2017/04/06 00:04:03 Done.
+ void DidReceiveCompositorFrameAck() 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;
+
+ // Member variables used by SurfaceAggregatorTest.
Fady Samuel 2017/04/05 21:32:42 This will go stale very quickly. Delete this?
Alex Z. 2017/04/06 00:04:03 Done.
+ gfx::Rect last_damage_rect_;
+ LocalSurfaceId last_local_surface_id_;
+ ReturnedResourceArray returned_resources_;
Fady Samuel 2017/04/05 21:32:42 DISALLOW_COPY_AND_ASSIGN(EmptyCompositorFrameSinkS
Alex Z. 2017/04/06 00:04:03 Done.
+};
+
+} // namespace cc
+
+#endif // CC_TEST_EMPTY_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698