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

Side by Side Diff: cc/overdraw_metrics.cc

Issue 11028132: cc: The recent texture manager bug uncovered some unnecessary code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to ToT Created 8 years, 1 month 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/overdraw_metrics.h ('k') | cc/prioritized_texture.h » ('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 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/overdraw_metrics.h" 7 #include "cc/overdraw_metrics.h"
8 8
9 #include "FloatQuad.h" 9 #include "FloatQuad.h"
10 #include "IntRect.h" 10 #include "IntRect.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 void OverdrawMetrics::didPaint(const IntRect& paintedRect) 62 void OverdrawMetrics::didPaint(const IntRect& paintedRect)
63 { 63 {
64 if (!m_recordMetricsForFrame) 64 if (!m_recordMetricsForFrame)
65 return; 65 return;
66 66
67 m_pixelsPainted += static_cast<float>(paintedRect.width()) * paintedRect.hei ght(); 67 m_pixelsPainted += static_cast<float>(paintedRect.width()) * paintedRect.hei ght();
68 } 68 }
69 69
70 void OverdrawMetrics::didCullTileForUpload() 70 void OverdrawMetrics::didCullTilesForUpload(int count)
71 { 71 {
72 if (m_recordMetricsForFrame) 72 if (m_recordMetricsForFrame)
73 ++m_tilesCulledForUpload; 73 m_tilesCulledForUpload += count;
74 } 74 }
75 75
76 void OverdrawMetrics::didUpload(const WebTransformationMatrix& transformToTarget , const IntRect& uploadRect, const IntRect& opaqueRect) 76 void OverdrawMetrics::didUpload(const WebTransformationMatrix& transformToTarget , const IntRect& uploadRect, const IntRect& opaqueRect)
77 { 77 {
78 if (!m_recordMetricsForFrame) 78 if (!m_recordMetricsForFrame)
79 return; 79 return;
80 80
81 float uploadArea = areaOfMappedQuad(transformToTarget, FloatQuad(uploadRect) ); 81 float uploadArea = areaOfMappedQuad(transformToTarget, FloatQuad(uploadRect) );
82 float uploadOpaqueArea = areaOfMappedQuad(transformToTarget, FloatQuad(inter section(opaqueRect, uploadRect))); 82 float uploadOpaqueArea = areaOfMappedQuad(transformToTarget, FloatQuad(inter section(opaqueRect, uploadRect)));
83 83
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 { 177 {
178 // This must be in a different scope than the TRACE_EVENTs above. 178 // This must be in a different scope than the TRACE_EVENTs above.
179 TRACE_EVENT2("cc", "OverdrawPaintMetrics", "ContentsTextureBytes", m _contentsTextureUseBytes, "RenderSurfaceTextureBytes", m_renderSurfaceTextureUse Bytes); 179 TRACE_EVENT2("cc", "OverdrawPaintMetrics", "ContentsTextureBytes", m _contentsTextureUseBytes, "RenderSurfaceTextureBytes", m_renderSurfaceTextureUse Bytes);
180 } 180 }
181 break; 181 break;
182 } 182 }
183 } 183 }
184 } 184 }
185 185
186 } // namespace cc 186 } // namespace cc
OLDNEW
« no previous file with comments | « cc/overdraw_metrics.h ('k') | cc/prioritized_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698