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

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: Minimum overhead toplevel tracing. 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
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame"); 110 TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame");
111 current_framebuffer_lock_.reset(); 111 current_framebuffer_lock_.reset();
112 current_canvas_ = NULL; 112 current_canvas_ = NULL;
113 root_canvas_ = NULL; 113 root_canvas_ = NULL;
114 114
115 current_frame_data_.reset(new SoftwareFrameData); 115 current_frame_data_.reset(new SoftwareFrameData);
116 output_device_->EndPaint(current_frame_data_.get()); 116 output_device_->EndPaint(current_frame_data_.get());
117 } 117 }
118 118
119 void SoftwareRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { 119 void SoftwareRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) {
120 TRACE_EVENT0("cc,cc-benchmark", "SoftwareRenderer::SwapBuffers");
120 CompositorFrame compositor_frame; 121 CompositorFrame compositor_frame;
121 compositor_frame.metadata = metadata; 122 compositor_frame.metadata = metadata;
122 compositor_frame.software_frame_data = current_frame_data_.Pass(); 123 compositor_frame.software_frame_data = current_frame_data_.Pass();
123 output_surface_->SwapBuffers(&compositor_frame); 124 output_surface_->SwapBuffers(&compositor_frame);
124 } 125 }
125 126
126 void SoftwareRenderer::ReceiveSwapBuffersAck(const CompositorFrameAck& ack) { 127 void SoftwareRenderer::ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {
127 output_device_->ReclaimSoftwareFrame(ack.last_software_frame_id); 128 output_device_->ReclaimSoftwareFrame(ack.last_software_frame_id);
128 } 129 }
129 130
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 return; 611 return;
611 visible_ = visible; 612 visible_ = visible;
612 613
613 if (visible_) 614 if (visible_)
614 EnsureBackbuffer(); 615 EnsureBackbuffer();
615 else 616 else
616 DiscardBackbuffer(); 617 DiscardBackbuffer();
617 } 618 }
618 619
619 } // namespace cc 620 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698