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

Side by Side Diff: cc/output/delegating_renderer.cc

Issue 14999012: Move cc/debug/latency_info to ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/output/delegating_renderer.h ('k') | cc/output/gl_renderer.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 DrawQuad::ResourceIteratorCallback append_to_array = 157 DrawQuad::ResourceIteratorCallback append_to_array =
158 base::Bind(&AppendToArray, &resources); 158 base::Bind(&AppendToArray, &resources);
159 for (size_t i = 0; i < out_data.render_pass_list.size(); ++i) { 159 for (size_t i = 0; i < out_data.render_pass_list.size(); ++i) {
160 RenderPass* render_pass = out_data.render_pass_list.at(i); 160 RenderPass* render_pass = out_data.render_pass_list.at(i);
161 for (size_t j = 0; j < render_pass->quad_list.size(); ++j) 161 for (size_t j = 0; j < render_pass->quad_list.size(); ++j)
162 render_pass->quad_list[j]->IterateResources(append_to_array); 162 render_pass->quad_list[j]->IterateResources(append_to_array);
163 } 163 }
164 resource_provider_->PrepareSendToParent(resources, &out_data.resource_list); 164 resource_provider_->PrepareSendToParent(resources, &out_data.resource_list);
165 } 165 }
166 166
167 void DelegatingRenderer::SwapBuffers(const LatencyInfo& latency_info) { 167 void DelegatingRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) {
168 TRACE_EVENT0("cc", "DelegatingRenderer::SwapBuffers"); 168 TRACE_EVENT0("cc", "DelegatingRenderer::SwapBuffers");
169 169
170 output_surface_->SendFrameToParentCompositor(&frame_for_swap_buffers_); 170 output_surface_->SendFrameToParentCompositor(&frame_for_swap_buffers_);
171 frame_for_swap_buffers_.delegated_frame_data.reset(); 171 frame_for_swap_buffers_.delegated_frame_data.reset();
172 } 172 }
173 173
174 void DelegatingRenderer::GetFramebufferPixels(void* pixels, gfx::Rect rect) { 174 void DelegatingRenderer::GetFramebufferPixels(void* pixels, gfx::Rect rect) {
175 NOTREACHED(); 175 NOTREACHED();
176 } 176 }
177 177
178 void DelegatingRenderer::ReceiveCompositorFrameAck( 178 void DelegatingRenderer::ReceiveCompositorFrameAck(
179 const CompositorFrameAck& ack) { 179 const CompositorFrameAck& ack) {
180 resource_provider_->ReceiveFromParent(ack.resources); 180 resource_provider_->ReceiveFromParent(ack.resources);
181 } 181 }
182 182
183 183
184 bool DelegatingRenderer::IsContextLost() { 184 bool DelegatingRenderer::IsContextLost() {
185 WebGraphicsContext3D* context3d = resource_provider_->GraphicsContext3D(); 185 WebGraphicsContext3D* context3d = resource_provider_->GraphicsContext3D();
186 if (!context3d) 186 if (!context3d)
187 return false; 187 return false;
188 return context3d->getGraphicsResetStatusARB() != GL_NO_ERROR; 188 return context3d->getGraphicsResetStatusARB() != GL_NO_ERROR;
189 } 189 }
190 190
191 void DelegatingRenderer::SetVisible(bool visible) { 191 void DelegatingRenderer::SetVisible(bool visible) {
192 visible_ = visible; 192 visible_ = visible;
193 } 193 }
194 194
195 } // namespace cc 195 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698