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

Unified Diff: blimp/client/core/render_widget/blimp_document_manager.cc

Issue 2459823003: blimp: Use SwapPromises for readback API. (Closed)
Patch Set: comment updated Created 4 years, 1 month 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 | « blimp/client/core/render_widget/blimp_document_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/render_widget/blimp_document_manager.cc
diff --git a/blimp/client/core/render_widget/blimp_document_manager.cc b/blimp/client/core/render_widget/blimp_document_manager.cc
index 3eb2e168260d7391d1d476444b1d7718c21351fb..ac7ce91dd58a2e259d3338fd4dac2cd447ccb578 100644
--- a/blimp/client/core/render_widget/blimp_document_manager.cc
+++ b/blimp/client/core/render_widget/blimp_document_manager.cc
@@ -7,6 +7,7 @@
#include "base/memory/ptr_util.h"
#include "blimp/client/core/compositor/blimp_compositor_dependencies.h"
#include "blimp/client/core/render_widget/blimp_document.h"
+#include "cc/output/copy_output_request.h"
#include "cc/proto/compositor_message.pb.h"
namespace blimp {
@@ -44,14 +45,14 @@ bool BlimpDocumentManager::OnTouchEvent(const ui::MotionEvent& motion_event) {
return false;
}
-void BlimpDocumentManager::NotifyWhenDonePendingCommits(
- base::Closure callback) {
- if (!active_document_ || !visible_) {
- callback.Run();
+void BlimpDocumentManager::RequestCopyOfCompositorOutput(
+ std::unique_ptr<cc::CopyOutputRequest> copy_request,
+ bool flush_pending_update) {
+ if (!active_document_)
return;
- }
- active_document_->GetCompositor()->NotifyWhenDonePendingCommits(callback);
+ active_document_->GetCompositor()->RequestCopyOfOutput(
+ std::move(copy_request), flush_pending_update);
}
std::unique_ptr<BlimpDocument> BlimpDocumentManager::CreateBlimpDocument(
« no previous file with comments | « blimp/client/core/render_widget/blimp_document_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698