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

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

Issue 17204002: Revert 206020 "cc: Emulate BeginFrame in OutputSurfaces that don..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
Index: trunk/src/content/browser/android/in_process/synchronous_compositor_output_surface.cc
===================================================================
--- trunk/src/content/browser/android/in_process/synchronous_compositor_output_surface.cc (revision 206654)
+++ trunk/src/content/browser/android/in_process/synchronous_compositor_output_surface.cc (working copy)
@@ -124,7 +124,6 @@
void SynchronousCompositorOutputSurface::SetNeedsBeginFrame(
bool enable) {
DCHECK(CalledOnValidThread());
- cc::OutputSurface::SetNeedsBeginFrame(enable);
needs_begin_frame_ = enable;
SynchronousCompositorOutputSurfaceDelegate* delegate = GetDelegate();
if (delegate)
@@ -142,7 +141,6 @@
delegate->UpdateFrameMetaData(frame->metadata);
did_swap_buffer_ = true;
- DidSwapBuffers();
}
namespace {
@@ -155,7 +153,7 @@
bool SynchronousCompositorOutputSurface::InitializeHwDraw() {
DCHECK(CalledOnValidThread());
- DCHECK(HasClient());
+ DCHECK(client_);
DCHECK(!context3d_);
// TODO(boliu): Get a context provider in constructor and pass here.
@@ -168,7 +166,7 @@
const gfx::Transform& transform,
gfx::Rect clip) {
DCHECK(CalledOnValidThread());
- DCHECK(HasClient());
+ DCHECK(client_);
DCHECK(context3d());
// Force a GL state restore next time a GLContextVirtual is made current.
@@ -182,7 +180,7 @@
gfx::Transform adjusted_transform = transform;
AdjustTransformForClip(&adjusted_transform, clip);
surface_size_ = surface_size;
- SetExternalDrawConstraints(adjusted_transform, clip);
+ client_->SetExternalDrawConstraints(adjusted_transform, clip);
InvokeComposite(clip.size());
// TODO(boliu): Check if context is lost here.
@@ -206,7 +204,7 @@
surface_size_ = gfx::Size(canvas->getDeviceSize().width(),
canvas->getDeviceSize().height());
- SetExternalDrawConstraints(transform, clip);
+ client_->SetExternalDrawConstraints(transform, clip);
InvokeComposite(clip.size());
@@ -217,12 +215,12 @@
void SynchronousCompositorOutputSurface::InvokeComposite(
gfx::Size damage_size) {
did_swap_buffer_ = false;
- SetNeedsRedrawRect(gfx::Rect(damage_size));
+ client_->SetNeedsRedrawRect(gfx::Rect(damage_size));
if (needs_begin_frame_)
- BeginFrame(base::TimeTicks::Now());
+ client_->BeginFrame(base::TimeTicks::Now());
if (did_swap_buffer_)
- OnSwapBuffersComplete(NULL);
+ client_->OnSwapBuffersComplete(NULL);
}
// Not using base::NonThreadSafe as we want to enforce a more exacting threading

Powered by Google App Engine
This is Rietveld 408576698