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

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

Issue 148613014: CC: Add 'cc-benchmark' traces for minimal tracing in benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 10 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
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | no next file » | 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/software_renderer.h" 5 #include "cc/output/software_renderer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame"); 144 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame");
145 current_framebuffer_lock_.reset(); 145 current_framebuffer_lock_.reset();
146 current_canvas_ = NULL; 146 current_canvas_ = NULL;
147 root_canvas_ = NULL; 147 root_canvas_ = NULL;
148 148
149 current_frame_data_.reset(new SoftwareFrameData); 149 current_frame_data_.reset(new SoftwareFrameData);
150 output_device_->EndPaint(current_frame_data_.get()); 150 output_device_->EndPaint(current_frame_data_.get());
151 } 151 }
152 152
153 void SoftwareRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { 153 void SoftwareRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) {
154 TRACE_EVENT0("cc,benchmark", "SoftwareRenderer::SwapBuffers");
154 CompositorFrame compositor_frame; 155 CompositorFrame compositor_frame;
155 compositor_frame.metadata = metadata; 156 compositor_frame.metadata = metadata;
156 compositor_frame.software_frame_data = current_frame_data_.Pass(); 157 compositor_frame.software_frame_data = current_frame_data_.Pass();
157 output_surface_->SwapBuffers(&compositor_frame); 158 output_surface_->SwapBuffers(&compositor_frame);
158 } 159 }
159 160
160 void SoftwareRenderer::ReceiveSwapBuffersAck(const CompositorFrameAck& ack) { 161 void SoftwareRenderer::ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {
161 output_device_->ReclaimSoftwareFrame(ack.last_software_frame_id); 162 output_device_->ReclaimSoftwareFrame(ack.last_software_frame_id);
162 } 163 }
163 164
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 return; 659 return;
659 visible_ = visible; 660 visible_ = visible;
660 661
661 if (visible_) 662 if (visible_)
662 EnsureBackbuffer(); 663 EnsureBackbuffer();
663 else 664 else
664 DiscardBackbuffer(); 665 DiscardBackbuffer();
665 } 666 }
666 667
667 } // namespace cc 668 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698