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

Unified Diff: content/renderer/pepper/pepper_compositor_host.cc

Issue 345443005: [PPAPI] Fix the CommitLayers() will never be completed issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Created 6 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_compositor_host.cc
diff --git a/content/renderer/pepper/pepper_compositor_host.cc b/content/renderer/pepper/pepper_compositor_host.cc
index 47c0fccfe6cb06198183de4377c305c91e2c0e9c..baba5b89b16ee0d272f15ec4002b0d9be4860e49 100644
--- a/content/renderer/pepper/pepper_compositor_host.cc
+++ b/content/renderer/pepper/pepper_compositor_host.cc
@@ -10,6 +10,7 @@
#include "cc/layers/solid_color_layer.h"
#include "cc/layers/texture_layer.h"
#include "cc/resources/texture_mailbox.h"
+#include "cc/trees/layer_tree_host.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "content/renderer/pepper/gfx_conversion.h"
#include "content/renderer/pepper/host_globals.h"
@@ -366,6 +367,12 @@ int32_t PepperCompositorHost::OnHostMsgCommitLayers(
layers_.push_back(LayerData(cc_layer, *pp_layer));
}
+ // We need to force a commit for each CommitLayers() call, even if no layers
+ // changed since the last call to CommitLayers(). This is so
+ // WiewInitiatedPaint() will always be called.
+ if (layer_->layer_tree_host())
+ layer_->layer_tree_host()->SetNeedsCommit();
+
return PP_OK_COMPLETIONPENDING;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698