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

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

Issue 15836005: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc
Patch Set: Fix PRId64 for Windows 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: 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 7613168adfd70901b16776a56a58c042b8d6bdaf..8e59473907441a23a694ec092c294efd363ee35e 100644
--- a/content/browser/android/in_process/synchronous_compositor_output_surface.cc
+++ b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
@@ -150,7 +150,7 @@ void AdjustTransformForClip(gfx::Transform* transform, gfx::Rect clip) {
bool SynchronousCompositorOutputSurface::InitializeHwDraw() {
DCHECK(CalledOnValidThread());
- DCHECK(client_);
+ DCHECK(HasClient());
DCHECK(!context3d_);
// TODO(boliu): Get a context provider in constructor and pass here.
@@ -163,7 +163,7 @@ bool SynchronousCompositorOutputSurface::DemandDrawHw(
const gfx::Transform& transform,
gfx::Rect clip) {
DCHECK(CalledOnValidThread());
- DCHECK(client_);
+ DCHECK(HasClient());
DCHECK(context3d());
// Force a GL state restore next time a GLContextVirtual is made current.
@@ -177,7 +177,7 @@ bool SynchronousCompositorOutputSurface::DemandDrawHw(
gfx::Transform adjusted_transform = transform;
AdjustTransformForClip(&adjusted_transform, clip);
surface_size_ = surface_size;
- client_->SetExternalDrawConstraints(adjusted_transform, clip);
+ SetExternalDrawConstraints(adjusted_transform, clip);
InvokeComposite(clip.size());
// TODO(boliu): Check if context is lost here.
@@ -201,7 +201,7 @@ bool SynchronousCompositorOutputSurface::DemandDrawSw(SkCanvas* canvas) {
surface_size_ = gfx::Size(canvas->getDeviceSize().width(),
canvas->getDeviceSize().height());
- client_->SetExternalDrawConstraints(transform, clip);
+ SetExternalDrawConstraints(transform, clip);
InvokeComposite(clip.size());
@@ -212,12 +212,12 @@ bool SynchronousCompositorOutputSurface::DemandDrawSw(SkCanvas* canvas) {
void SynchronousCompositorOutputSurface::InvokeComposite(
gfx::Size damage_size) {
did_swap_buffer_ = false;
- client_->SetNeedsRedrawRect(gfx::Rect(damage_size));
+ SetNeedsRedrawRect(gfx::Rect(damage_size));
if (needs_begin_frame_)
- client_->BeginFrame(base::TimeTicks::Now());
+ BeginFrame(base::TimeTicks::Now());
if (did_swap_buffer_)
- client_->OnSwapBuffersComplete(NULL);
+ OnSwapBuffersComplete(NULL);
}
// Not using base::NonThreadSafe as we want to enforce a more exacting threading
« no previous file with comments | « chrome/test/perf/rendering/latency_tests.cc ('k') | content/browser/renderer_host/image_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698