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

Unified Diff: content/browser/android/synchronous_compositor_browser_filter.cc

Issue 2458743002: Switching to base::Optional<CompositorFrame> in Android's synchronous compositor IPC messages (Closed)
Patch Set: Style Created 4 years, 2 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 | « no previous file | content/browser/android/synchronous_compositor_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/synchronous_compositor_browser_filter.cc
diff --git a/content/browser/android/synchronous_compositor_browser_filter.cc b/content/browser/android/synchronous_compositor_browser_filter.cc
index d1a7b9f9c9873fd7c0e646256f5d12e43d0be213..8d341ff19a5917918b93f01f7c3d35de433da5a0 100644
--- a/content/browser/android/synchronous_compositor_browser_filter.cc
+++ b/content/browser/android/synchronous_compositor_browser_filter.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/lazy_instance.h"
+#include "base/optional.h"
#include "base/stl_util.h"
#include "content/browser/android/synchronous_compositor_host.h"
#include "content/browser/bad_message.h"
@@ -80,10 +81,10 @@ bool SynchronousCompositorBrowserFilter::ReceiveFrame(
auto frame_ptr = base::MakeUnique<SynchronousCompositor::Frame>();
frame_ptr->compositor_frame_sink_id = std::get<0>(param);
- cc::CompositorFrame& compositor_frame = std::get<1>(param);
- if (compositor_frame.delegated_frame_data) {
+ base::Optional<cc::CompositorFrame>& compositor_frame = std::get<1>(param);
+ if (compositor_frame) {
frame_ptr->frame.reset(new cc::CompositorFrame);
- *frame_ptr->frame = std::move(compositor_frame);
+ *frame_ptr->frame = std::move(*compositor_frame);
}
future->setFrame(std::move(frame_ptr));
// TODO(boliu): Post metadata back to UI thread.
« no previous file with comments | « no previous file | content/browser/android/synchronous_compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698