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

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: Address Nits 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..ac5d14dea7d11501801d30c2013344597a4ae0d3
--- /dev/null
+++ b/cc/test/empty_compositor_frame_sink_support_client.h
@@ -0,0 +1,45 @@
+// 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;
+
+ // CompositorFrameSinkSupportClient implementation.
+ 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;
+
+ 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(EmptyCompositorFrameSinkSupportClient);
+};
+
+} // namespace cc
+
+#endif // CC_TEST_EMPTY_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698