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

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..ba2ddc6d7e1891fd10cd1176a6fb9e545ea20bf8 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,8 +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),
output_surface_client_(NULL),
@@ -121,14 +118,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());
@@ -220,9 +209,7 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
gfx::Rect viewport_rect_for_tile_priority,
gfx::Transform transform_for_tile_priority,
bool hardware_draw) {
- DCHECK(!invoking_composite_);
DCHECK(!frame_holder_.get());
- base::AutoReset<bool> invoking_composite_resetter(&invoking_composite_, true);
gfx::Transform adjusted_transform = transform;
AdjustTransform(&adjusted_transform, viewport);
@@ -233,7 +220,6 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
transform_for_tile_priority,
!hardware_draw);
SetNeedsRedrawRect(gfx::Rect(viewport.size()));
- client_->BeginFrame(cc::BeginFrameArgs::CreateForSynchronousCompositor());
// After software draws (which might move the viewport arbitrarily), restore
// the previous hardware viewport to allow CC's tile manager to prioritize
@@ -257,10 +243,6 @@ void SynchronousCompositorOutputSurface::InvokeComposite(
if (frame_holder_.get())
client_->DidSwapBuffersComplete();
-
- SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate();
- if (delegate)
- delegate->SetContinuousInvalidate(needs_begin_frame_);
}
void SynchronousCompositorOutputSurface::ReturnResources(

Powered by Google App Engine
This is Rietveld 408576698