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

Unified Diff: content/renderer/gpu/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: Created 7 years, 7 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/renderer/gpu/compositor_output_surface.cc
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 16d6ad0dd50473f2316acba2f958a1ee5e6b824f..97848793e31e719006e6a2e28d7b2835c1b883ea 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -64,12 +64,13 @@ CompositorOutputSurface::CompositorOutputSurface(
switches::kEnableDelegatedRenderer);
DetachFromThread();
message_sender_ = RenderThreadImpl::current()->sync_message_filter();
+
DCHECK(message_sender_);
}
CompositorOutputSurface::~CompositorOutputSurface() {
DCHECK(CalledOnValidThread());
- if (!client_)
+ if (!hasClient())
brianderson 2013/06/01 04:30:29 client_ is a private member of the base class, whi
return;
UpdateSmoothnessTakesPriority(false);
if (output_surface_proxy_)
@@ -125,7 +126,7 @@ void CompositorOutputSurface::PostSubBuffer(
void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) {
DCHECK(CalledOnValidThread());
- if (!client_)
+ if (!hasClient())
return;
IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, OnUpdateVSyncParameters);
@@ -139,7 +140,7 @@ void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) {
void CompositorOutputSurface::OnUpdateVSyncParameters(
base::TimeTicks timebase, base::TimeDelta interval) {
DCHECK(CalledOnValidThread());
- client_->OnVSyncParametersChanged(timebase, interval);
+ OnVSyncParametersChanged(timebase, interval);
}
#if defined(OS_ANDROID)
@@ -150,12 +151,12 @@ void CompositorOutputSurface::SetNeedsBeginFrame(bool enable) {
void CompositorOutputSurface::OnBeginFrame(base::TimeTicks frame_time) {
DCHECK(CalledOnValidThread());
- client_->BeginFrame(frame_time);
+ BeginFrame(frame_time);
}
#endif // defined(OS_ANDROID)
void CompositorOutputSurface::OnSwapAck(const cc::CompositorFrameAck& ack) {
- client_->OnSendFrameToParentCompositorAck(ack);
+ OnSendFrameToParentCompositorAck(ack);
}
bool CompositorOutputSurface::Send(IPC::Message* message) {
« cc/trees/thread_proxy.cc ('K') | « content/renderer/android/synchronous_compositor_output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698