OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 | 5 |
6 #include "config.h" | 6 #include "config.h" |
7 | 7 |
8 #include "CanvasLayerTextureUpdater.h" | 8 #include "CanvasLayerTextureUpdater.h" |
9 | 9 |
10 #include "CCRenderingStats.h" | 10 #include "CCRenderingStats.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 SkRect layerSkRect = SkRect::MakeXYWH(layerRect.x(), layerRect.y(), layerRec
t.width(), layerRect.height()); | 50 SkRect layerSkRect = SkRect::MakeXYWH(layerRect.x(), layerRect.y(), layerRec
t.width(), layerRect.height()); |
51 canvas->drawRect(layerSkRect, paint); | 51 canvas->drawRect(layerSkRect, paint); |
52 canvas->clipRect(layerSkRect); | 52 canvas->clipRect(layerSkRect); |
53 | 53 |
54 FloatRect opaqueLayerRect; | 54 FloatRect opaqueLayerRect; |
55 double paintBeginTime = monotonicallyIncreasingTime(); | 55 double paintBeginTime = monotonicallyIncreasingTime(); |
56 m_painter->paint(canvas, layerRect, opaqueLayerRect); | 56 m_painter->paint(canvas, layerRect, opaqueLayerRect); |
57 stats.totalPaintTimeInSeconds += monotonicallyIncreasingTime() - paintBeginT
ime; | 57 stats.totalPaintTimeInSeconds += monotonicallyIncreasingTime() - paintBeginT
ime; |
58 canvas->restore(); | 58 canvas->restore(); |
59 | 59 |
| 60 stats.totalPixelsPainted += contentRect.width() * contentRect.height(); |
| 61 |
60 FloatRect opaqueContentRect = opaqueLayerRect; | 62 FloatRect opaqueContentRect = opaqueLayerRect; |
61 opaqueContentRect.scale(contentsWidthScale, contentsHeightScale); | 63 opaqueContentRect.scale(contentsWidthScale, contentsHeightScale); |
62 resultingOpaqueRect = enclosedIntRect(opaqueContentRect); | 64 resultingOpaqueRect = enclosedIntRect(opaqueContentRect); |
63 | 65 |
64 m_contentRect = contentRect; | 66 m_contentRect = contentRect; |
65 } | 67 } |
66 | 68 |
67 } // namespace cc | 69 } // namespace cc |
OLD | NEW |