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

Side by Side Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 11777025: cc: Implement DelegatingRender::drawFrame() method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for-landing Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/gpu/compositor_output_surface.h" 5 #include "content/renderer/gpu/compositor_output_surface.h"
6 6
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "cc/compositor_frame.h" 8 #include "cc/compositor_frame.h"
9 #include "cc/output_surface_client.h" 9 #include "cc/output_surface_client.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 WebGraphicsContext3D* CompositorOutputSurface::Context3D() const { 84 WebGraphicsContext3D* CompositorOutputSurface::Context3D() const {
85 DCHECK(CalledOnValidThread()); 85 DCHECK(CalledOnValidThread());
86 return context3D_.get(); 86 return context3D_.get();
87 } 87 }
88 88
89 cc::SoftwareOutputDevice* CompositorOutputSurface::SoftwareDevice() const { 89 cc::SoftwareOutputDevice* CompositorOutputSurface::SoftwareDevice() const {
90 return software_device_.get(); 90 return software_device_.get();
91 } 91 }
92 92
93 void CompositorOutputSurface::SendFrameToParentCompositor( 93 void CompositorOutputSurface::SendFrameToParentCompositor(
94 const cc::CompositorFrame& frame) { 94 cc::CompositorFrame* frame) {
95 DCHECK(CalledOnValidThread()); 95 DCHECK(CalledOnValidThread());
96 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_, frame)); 96 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_, *frame));
97 } 97 }
98 98
99 void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { 99 void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) {
100 DCHECK(CalledOnValidThread()); 100 DCHECK(CalledOnValidThread());
101 if (!client_) 101 if (!client_)
102 return; 102 return;
103 IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message) 103 IPC_BEGIN_MESSAGE_MAP(CompositorOutputSurface, message)
104 IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, OnUpdateVSyncParameters); 104 IPC_MESSAGE_HANDLER(ViewMsg_UpdateVSyncParameters, OnUpdateVSyncParameters);
105 IPC_END_MESSAGE_MAP() 105 IPC_END_MESSAGE_MAP()
106 } 106 }
107 107
108 void CompositorOutputSurface::OnUpdateVSyncParameters( 108 void CompositorOutputSurface::OnUpdateVSyncParameters(
109 base::TimeTicks timebase, base::TimeDelta interval) { 109 base::TimeTicks timebase, base::TimeDelta interval) {
110 DCHECK(CalledOnValidThread()); 110 DCHECK(CalledOnValidThread());
111 DCHECK(client_); 111 DCHECK(client_);
112 client_->OnVSyncParametersChanged(timebase, interval); 112 client_->OnVSyncParametersChanged(timebase, interval);
113 } 113 }
114 114
115 bool CompositorOutputSurface::Send(IPC::Message* message) { 115 bool CompositorOutputSurface::Send(IPC::Message* message) {
116 return ChildThread::current()->sync_message_filter()->Send(message); 116 return ChildThread::current()->sync_message_filter()->Send(message);
117 } 117 }
118 118
119 } // namespace content 119 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698