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

Side by Side Diff: cc/output/gl_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/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.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 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 SetShaderOpacity(1, program->fragment_shader().alpha_location()); 1960 SetShaderOpacity(1, program->fragment_shader().alpha_location());
1961 DrawQuadGeometry( 1961 DrawQuadGeometry(
1962 frame, draw_matrix, rect, program->vertex_shader().matrix_location()); 1962 frame, draw_matrix, rect, program->vertex_shader().matrix_location());
1963 } 1963 }
1964 1964
1965 void GLRenderer::Finish() { 1965 void GLRenderer::Finish() {
1966 TRACE_EVENT0("cc", "GLRenderer::finish"); 1966 TRACE_EVENT0("cc", "GLRenderer::finish");
1967 context_->finish(); 1967 context_->finish();
1968 } 1968 }
1969 1969
1970 void GLRenderer::SwapBuffers(const LatencyInfo& latency_info) { 1970 void GLRenderer::SwapBuffers(const ui::LatencyInfo& latency_info) {
1971 DCHECK(visible_); 1971 DCHECK(visible_);
1972 DCHECK(!is_backbuffer_discarded_); 1972 DCHECK(!is_backbuffer_discarded_);
1973 1973
1974 TRACE_EVENT0("cc", "GLRenderer::SwapBuffers"); 1974 TRACE_EVENT0("cc", "GLRenderer::SwapBuffers");
1975 // We're done! Time to swapbuffers! 1975 // We're done! Time to swapbuffers!
1976 1976
1977 if (capabilities_.using_partial_swap && client_->AllowPartialSwap()) { 1977 if (capabilities_.using_partial_swap && client_->AllowPartialSwap()) {
1978 // If supported, we can save significant bandwidth by only swapping the 1978 // If supported, we can save significant bandwidth by only swapping the
1979 // damaged/scissored region (clamped to the viewport) 1979 // damaged/scissored region (clamped to the viewport)
1980 swap_buffer_rect_.Intersect(gfx::Rect(ViewportSize())); 1980 swap_buffer_rect_.Intersect(gfx::Rect(ViewportSize()));
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas 2911 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas
2912 // implementation. 2912 // implementation.
2913 return gr_context_ && context_->getContextAttributes().stencil; 2913 return gr_context_ && context_->getContextAttributes().stencil;
2914 } 2914 }
2915 2915
2916 bool GLRenderer::IsContextLost() { 2916 bool GLRenderer::IsContextLost() {
2917 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); 2917 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR);
2918 } 2918 }
2919 2919
2920 } // namespace cc 2920 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698