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

Unified Diff: cc/trees/proxy_main.cc

Issue 2282433002: Revert of cc: Delete all the RendererCapabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-prepare-mailbox-param
Patch Set: Created 4 years, 4 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 | « cc/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_main.cc
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index 9f3a1add77240eca8a87a262e243dd6a36c1b71b..04de28097a497ecacf39444e8f1d9bef3f04c1ee 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -76,6 +76,12 @@
layer_tree_host_->DidCompleteSwapBuffers();
}
+void ProxyMain::SetRendererCapabilities(
+ const RendererCapabilities& capabilities) {
+ DCHECK(IsMainThread());
+ renderer_capabilities_ = capabilities;
+}
+
void ProxyMain::BeginMainFrameNotExpectedSoon() {
TRACE_EVENT0("cc", "ProxyMain::BeginMainFrameNotExpectedSoon");
DCHECK(IsMainThread());
@@ -105,14 +111,18 @@
layer_tree_host_->RequestNewOutputSurface();
}
-void ProxyMain::DidInitializeOutputSurface(bool success) {
+void ProxyMain::DidInitializeOutputSurface(
+ bool success,
+ const RendererCapabilities& capabilities) {
TRACE_EVENT0("cc", "ProxyMain::DidInitializeOutputSurface");
DCHECK(IsMainThread());
- if (!success)
+ if (!success) {
layer_tree_host_->DidFailToInitializeOutputSurface();
- else
- layer_tree_host_->DidInitializeOutputSurface();
+ return;
+ }
+ renderer_capabilities_ = capabilities;
+ layer_tree_host_->DidInitializeOutputSurface();
}
void ProxyMain::DidCompletePageScaleAnimation() {
@@ -268,6 +278,12 @@
void ProxyMain::SetVisible(bool visible) {
TRACE_EVENT1("cc", "ProxyMain::SetVisible", "visible", visible);
channel_main_->SetVisibleOnImpl(visible);
+}
+
+const RendererCapabilities& ProxyMain::GetRendererCapabilities() const {
+ DCHECK(IsMainThread());
+ DCHECK(!layer_tree_host_->output_surface_lost());
+ return renderer_capabilities_;
}
void ProxyMain::SetNeedsAnimate() {
« no previous file with comments | « cc/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698