Index: cc/surfaces/display.cc |
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc |
index 129a11615d380f6821ca0737e5d72be17ee20ee3..f07278ed63e5e8fa394cacf1047660d56351a7bc 100644 |
--- a/cc/surfaces/display.cc |
+++ b/cc/surfaces/display.cc |
@@ -14,6 +14,7 @@ |
#include "cc/output/software_renderer.h" |
#include "cc/resources/texture_mailbox_deleter.h" |
#include "cc/surfaces/display_client.h" |
+#include "cc/surfaces/display_scheduler.h" |
#include "cc/surfaces/surface.h" |
#include "cc/surfaces/surface_aggregator.h" |
#include "cc/surfaces/surface_manager.h" |
@@ -41,8 +42,10 @@ Display::~Display() { |
manager_->RemoveObserver(this); |
} |
-bool Display::Initialize(scoped_ptr<OutputSurface> output_surface) { |
+bool Display::Initialize(scoped_ptr<OutputSurface> output_surface, |
+ DisplayScheduler* scheduler) { |
output_surface_ = output_surface.Pass(); |
+ scheduler_ = scheduler; |
return output_surface_->BindToClient(this); |
} |
@@ -52,7 +55,7 @@ void Display::Resize(SurfaceId id, |
current_surface_id_ = id; |
current_surface_size_ = size; |
device_scale_factor_ = device_scale_factor; |
- client_->DisplayDamaged(); |
+ scheduler_->DisplayDamaged(); |
} |
void Display::InitializeRenderer() { |
@@ -98,6 +101,7 @@ void Display::InitializeRenderer() { |
void Display::DidLoseOutputSurface() { |
client_->OutputSurfaceLost(); |
+ scheduler_->OutputSurfaceLost(); |
} |
bool Display::Draw() { |
@@ -142,16 +146,17 @@ bool Display::Draw() { |
} |
void Display::DidSwapBuffers() { |
- client_->DidSwapBuffers(); |
+ scheduler_->DidSwapBuffers(); |
} |
void Display::DidSwapBuffersComplete() { |
- client_->DidSwapBuffersComplete(); |
+ scheduler_->DidSwapBuffersComplete(); |
} |
void Display::CommitVSyncParameters(base::TimeTicks timebase, |
base::TimeDelta interval) { |
client_->CommitVSyncParameters(timebase, interval); |
+ scheduler_->CommitVSyncParameters(timebase, interval); |
} |
void Display::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { |
@@ -160,7 +165,7 @@ void Display::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { |
void Display::OnSurfaceDamaged(SurfaceId surface) { |
if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface)) |
- client_->DisplayDamaged(); |
+ scheduler_->DisplayDamaged(); |
} |
SurfaceId Display::CurrentSurfaceId() { |