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

Unified Diff: content/browser/android/in_process/synchronous_compositor_output_surface.cc

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: content/browser/android/in_process/synchronous_compositor_output_surface.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_output_surface.cc b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
index 7b8464b81a0f29f164a9321af6c1e75730e0a525..fcffeadcf1afd572c4bfa95bf90f8ee0521165c4 100644
--- a/content/browser/android/in_process/synchronous_compositor_output_surface.cc
+++ b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
@@ -6,7 +6,6 @@
#include "base/auto_reset.h"
#include "base/logging.h"
-#include "cc/output/begin_frame_args.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/context_provider.h"
#include "cc/output/output_surface_client.h"
@@ -73,7 +72,6 @@ SynchronousCompositorOutputSurface::SynchronousCompositorOutputSurface(
: cc::OutputSurface(
scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareDevice(this))),
routing_id_(routing_id),
- needs_begin_frame_(false),
invoking_composite_(false),
current_sw_canvas_(NULL),
memory_policy_(0),
@@ -121,14 +119,6 @@ void SynchronousCompositorOutputSurface::Reshape(
// Intentional no-op: surface size is controlled by the embedder.
}
-void SynchronousCompositorOutputSurface::SetNeedsBeginFrame(bool enable) {
- DCHECK(CalledOnValidThread());
- needs_begin_frame_ = enable;
- SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate();
- if (delegate && !invoking_composite_)
- delegate->SetContinuousInvalidate(needs_begin_frame_);
-}
-
void SynchronousCompositorOutputSurface::SwapBuffers(
cc::CompositorFrame* frame) {
DCHECK(CalledOnValidThread());
@@ -233,7 +223,10 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
transform_for_tile_priority,
!hardware_draw);
SetNeedsRedrawRect(gfx::Rect(viewport.size()));
- client_->BeginFrame(cc::BeginFrameArgs::CreateForSynchronousCompositor());
+
+ SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate();
+ if (delegate)
+ delegate->BeginFrame();
// After software draws (which might move the viewport arbitrarily), restore
// the previous hardware viewport to allow CC's tile manager to prioritize
@@ -258,9 +251,8 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
if (frame_holder_.get())
client_->DidSwapBuffersComplete();
- SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate();
if (delegate)
- delegate->SetContinuousInvalidate(needs_begin_frame_);
+ delegate->UpdateContinuousInvalidate();
}
void SynchronousCompositorOutputSurface::ReturnResources(

Powered by Google App Engine
This is Rietveld 408576698