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

Side by Side Diff: cc/output/gl_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/delegating_renderer.cc ('k') | cc/output/software_renderer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 } 2133 }
2134 2134
2135 void GLRenderer::Finish() { 2135 void GLRenderer::Finish() {
2136 TRACE_EVENT0("cc", "GLRenderer::Finish"); 2136 TRACE_EVENT0("cc", "GLRenderer::Finish");
2137 GLC(gl_, gl_->Finish()); 2137 GLC(gl_, gl_->Finish());
2138 } 2138 }
2139 2139
2140 void GLRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) { 2140 void GLRenderer::SwapBuffers(const CompositorFrameMetadata& metadata) {
2141 DCHECK(!is_backbuffer_discarded_); 2141 DCHECK(!is_backbuffer_discarded_);
2142 2142
2143 TRACE_EVENT0("cc", "GLRenderer::SwapBuffers"); 2143 TRACE_EVENT0("cc,benchmark", "GLRenderer::SwapBuffers");
2144 // We're done! Time to swapbuffers! 2144 // We're done! Time to swapbuffers!
2145 2145
2146 gfx::Size surface_size = output_surface_->SurfaceSize(); 2146 gfx::Size surface_size = output_surface_->SurfaceSize();
2147 2147
2148 CompositorFrame compositor_frame; 2148 CompositorFrame compositor_frame;
2149 compositor_frame.metadata = metadata; 2149 compositor_frame.metadata = metadata;
2150 compositor_frame.gl_frame_data = make_scoped_ptr(new GLFrameData); 2150 compositor_frame.gl_frame_data = make_scoped_ptr(new GLFrameData);
2151 compositor_frame.gl_frame_data->size = surface_size; 2151 compositor_frame.gl_frame_data->size = surface_size;
2152 if (capabilities_.using_partial_swap) { 2152 if (capabilities_.using_partial_swap) {
2153 // If supported, we can save significant bandwidth by only swapping the 2153 // If supported, we can save significant bandwidth by only swapping the
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 is_scissor_enabled_ = false; 3042 is_scissor_enabled_ = false;
3043 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); 3043 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST));
3044 scissor_rect_needs_reset_ = true; 3044 scissor_rect_needs_reset_ = true;
3045 } 3045 }
3046 3046
3047 bool GLRenderer::IsContextLost() { 3047 bool GLRenderer::IsContextLost() {
3048 return output_surface_->context_provider()->IsContextLost(); 3048 return output_surface_->context_provider()->IsContextLost();
3049 } 3049 }
3050 3050
3051 } // namespace cc 3051 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/software_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698