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

Unified Diff: content/public/test/test_synchronous_compositor_android.cc

Issue 1769913003: sync compositor: Add output_surface_id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test Created 4 years, 9 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: content/public/test/test_synchronous_compositor_android.cc
diff --git a/content/public/test/test_synchronous_compositor_android.cc b/content/public/test/test_synchronous_compositor_android.cc
index 9eff3ff3d104cfddf6fee2511f84a5c81b75cc27..6a52e2b192528ea342b5059bb22bf749c666c053 100644
--- a/content/public/test/test_synchronous_compositor_android.cc
+++ b/content/public/test/test_synchronous_compositor_android.cc
@@ -27,7 +27,7 @@ void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) {
}
}
-scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw(
+SynchronousCompositor::Frame TestSynchronousCompositor::DemandDrawHw(
const gfx::Size& surface_size,
const gfx::Transform& transform,
const gfx::Rect& viewport,
@@ -37,14 +37,27 @@ scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw(
return std::move(hardware_frame_);
}
+void TestSynchronousCompositor::ReturnResources(
+ uint32_t output_surface_id,
+ const cc::CompositorFrameAck& frame_ack) {
+ frame_ack_array_.push_back({output_surface_id, frame_ack.resources});
+}
+
+void TestSynchronousCompositor::SwapReturnedResources(FrameAckArray* array) {
+ DCHECK(array);
+ frame_ack_array_.swap(*array);
+}
+
bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) {
DCHECK(canvas);
return true;
}
void TestSynchronousCompositor::SetHardwareFrame(
+ uint32_t output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) {
- hardware_frame_ = std::move(frame);
+ hardware_frame_.output_surface_id = output_surface_id;
+ hardware_frame_.frame = std::move(frame);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698