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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 1262163004: android: Change OutputSurfaceWithoutParent max swaps to 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use kConstants Created 5 years, 3 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/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index a75b5ccacdab4d94023b84af9c43a95457f3cd1f..8d83d690ec6a4f87056e1989f1d2b4c9eca4c1d2 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -67,7 +67,8 @@ namespace content {
namespace {
-const unsigned int kMaxSwapBuffers = 2U;
+const unsigned int kMaxUiSwapBuffers = 1U;
+const unsigned int kMaxDisplaySwapBuffers = 1U;
// Used to override capabilities_.adjust_deadline_for_parent to false
class OutputSurfaceWithoutParent : public cc::OutputSurface,
@@ -85,7 +86,7 @@ class OutputSurfaceWithoutParent : public cc::OutputSurface,
base::Bind(&OutputSurfaceWithoutParent::OnSwapBuffersCompleted,
base::Unretained(this))) {
capabilities_.adjust_deadline_for_parent = false;
- capabilities_.max_frames_pending = 2;
+ capabilities_.max_frames_pending = kMaxDisplaySwapBuffers;
}
~OutputSurfaceWithoutParent() override { compositor_->RemoveObserver(this); }
@@ -329,11 +330,11 @@ void CompositorImpl::Composite(CompositingTrigger trigger) {
DCHECK(needs_composite_);
DCHECK(!DidCompositeThisFrame());
- DCHECK_LE(pending_swapbuffers_, kMaxSwapBuffers);
+ DCHECK_LE(pending_swapbuffers_, kMaxUiSwapBuffers);
// Swap Ack accounting is unreliable if the OutputSurface was lost.
// In that case still attempt to composite, which will cause creation of a
// new OutputSurface and reset pending_swapbuffers_.
- if (pending_swapbuffers_ == kMaxSwapBuffers &&
+ if (pending_swapbuffers_ == kMaxUiSwapBuffers &&
!host_->output_surface_lost()) {
TRACE_EVENT0("compositor", "CompositorImpl_SwapLimit");
return;
@@ -730,7 +731,7 @@ void CompositorImpl::DidPostSwapBuffers() {
void CompositorImpl::DidCompleteSwapBuffers() {
TRACE_EVENT0("compositor", "CompositorImpl::DidCompleteSwapBuffers");
DCHECK_GT(pending_swapbuffers_, 0U);
- if (pending_swapbuffers_-- == kMaxSwapBuffers && needs_composite_)
+ if (pending_swapbuffers_-- == kMaxUiSwapBuffers && needs_composite_)
PostComposite(COMPOSITE_IMMEDIATELY);
client_->OnSwapBuffersCompleted(pending_swapbuffers_);
}
« 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