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

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

Issue 2442453003: cc: Add back a benchmark category trace for counting renderer frames (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | cc/output/software_renderer.cc » ('j') | tools/perf/metrics/timeline.py » ('J')
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 static float gl_matrix[16]; 2890 static float gl_matrix[16];
2891 ToGLMatrix(&gl_matrix[0], projection_matrix * quad_rect_matrix); 2891 ToGLMatrix(&gl_matrix[0], projection_matrix * quad_rect_matrix);
2892 gl_->UniformMatrix4fv(matrix_location, 1, false, &gl_matrix[0]); 2892 gl_->UniformMatrix4fv(matrix_location, 1, false, &gl_matrix[0]);
2893 2893
2894 gl_->DrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0); 2894 gl_->DrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
2895 } 2895 }
2896 2896
2897 void GLRenderer::SwapBuffers(std::vector<ui::LatencyInfo> latency_info) { 2897 void GLRenderer::SwapBuffers(std::vector<ui::LatencyInfo> latency_info) {
2898 DCHECK(visible_); 2898 DCHECK(visible_);
2899 2899
2900 TRACE_EVENT0("cc,benchmark", "GLRenderer::SwapBuffers"); 2900 TRACE_EVENT0("cc", "GLRenderer::SwapBuffers");
2901 // We're done! Time to swapbuffers! 2901 // We're done! Time to swapbuffers!
2902 2902
2903 gfx::Size surface_size = surface_size_for_swap_buffers(); 2903 gfx::Size surface_size = surface_size_for_swap_buffers();
2904 2904
2905 OutputSurfaceFrame output_frame; 2905 OutputSurfaceFrame output_frame;
2906 output_frame.latency_info = std::move(latency_info); 2906 output_frame.latency_info = std::move(latency_info);
2907 output_frame.size = surface_size; 2907 output_frame.size = surface_size;
2908 if (use_partial_swap_) { 2908 if (use_partial_swap_) {
2909 // If supported, we can save significant bandwidth by only swapping the 2909 // If supported, we can save significant bandwidth by only swapping the
2910 // damaged/scissored region (clamped to the viewport). 2910 // damaged/scissored region (clamped to the viewport).
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
4044 4044
4045 gl_->ScheduleCALayerSharedStateCHROMIUM( 4045 gl_->ScheduleCALayerSharedStateCHROMIUM(
4046 ca_layer_overlay->shared_state->opacity, is_clipped, clip_rect, 4046 ca_layer_overlay->shared_state->opacity, is_clipped, clip_rect,
4047 sorting_context_id, gl_transform); 4047 sorting_context_id, gl_transform);
4048 gl_->ScheduleCALayerCHROMIUM( 4048 gl_->ScheduleCALayerCHROMIUM(
4049 texture_id, contents_rect, ca_layer_overlay->background_color, 4049 texture_id, contents_rect, ca_layer_overlay->background_color,
4050 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); 4050 ca_layer_overlay->edge_aa_mask, bounds_rect, filter);
4051 } 4051 }
4052 4052
4053 } // namespace cc 4053 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/software_renderer.cc » ('j') | tools/perf/metrics/timeline.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698