| 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 #include "web_layer_tree_view_impl.h" | 5 #include "web_layer_tree_view_impl.h" |
| 6 | 6 |
| 7 #include "cc/font_atlas.h" | 7 #include "cc/font_atlas.h" |
| 8 #include "cc/input_handler.h" | 8 #include "cc/input_handler.h" |
| 9 #include "cc/layer.h" | 9 #include "cc/layer.h" |
| 10 #include "cc/layer_tree_host.h" | 10 #include "cc/layer_tree_host.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void WebLayerTreeViewImpl::finishAllRendering() | 159 void WebLayerTreeViewImpl::finishAllRendering() |
| 160 { | 160 { |
| 161 m_layerTreeHost->finishAllRendering(); | 161 m_layerTreeHost->finishAllRendering(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void WebLayerTreeViewImpl::setDeferCommits(bool deferCommits) | 164 void WebLayerTreeViewImpl::setDeferCommits(bool deferCommits) |
| 165 { | 165 { |
| 166 m_layerTreeHost->setDeferCommits(deferCommits); | 166 m_layerTreeHost->setDeferCommits(deferCommits); |
| 167 } | 167 } |
| 168 | 168 |
| 169 #ifdef NOT_USING_WEB_RENDERING_STATS |
| 170 void WebLayerTreeViewImpl::renderingStats(void* stats) const |
| 171 { |
| 172 m_layerTreeHost->renderingStats(static_cast<RenderingStats*>(stats)); |
| 173 } |
| 174 #else |
| 169 void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const | 175 void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const |
| 170 { | 176 { |
| 171 RenderingStats ccStats; | 177 RenderingStats ccStats; |
| 172 m_layerTreeHost->renderingStats(&ccStats); | 178 m_layerTreeHost->renderingStats(&ccStats); |
| 173 | 179 |
| 174 stats.numAnimationFrames = ccStats.numAnimationFrames; | 180 stats.numAnimationFrames = ccStats.numAnimationFrames; |
| 175 stats.numFramesSentToScreen = ccStats.numFramesSentToScreen; | 181 stats.numFramesSentToScreen = ccStats.numFramesSentToScreen; |
| 176 stats.droppedFrameCount = ccStats.droppedFrameCount; | 182 stats.droppedFrameCount = ccStats.droppedFrameCount; |
| 177 stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; | 183 stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; |
| 178 stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; | 184 stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; |
| 179 stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; | 185 stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; |
| 180 stats.totalCommitCount = ccStats.totalCommitCount; | 186 stats.totalCommitCount = ccStats.totalCommitCount; |
| 181 stats.totalPixelsPainted = ccStats.totalPixelsPainted; | 187 stats.totalPixelsPainted = ccStats.totalPixelsPainted; |
| 182 stats.totalPixelsRasterized = ccStats.totalPixelsRasterized; | 188 stats.totalPixelsRasterized = ccStats.totalPixelsRasterized; |
| 183 stats.numImplThreadScrolls = ccStats.numImplThreadScrolls; | 189 stats.numImplThreadScrolls = ccStats.numImplThreadScrolls; |
| 184 stats.numMainThreadScrolls = ccStats.numMainThreadScrolls; | 190 stats.numMainThreadScrolls = ccStats.numMainThreadScrolls; |
| 185 } | 191 } |
| 192 #endif // NOT_USING_WEB_RENDERING_STATS |
| 186 | 193 |
| 187 void WebLayerTreeViewImpl::setShowFPSCounter(bool show) | 194 void WebLayerTreeViewImpl::setShowFPSCounter(bool show) |
| 188 { | 195 { |
| 189 m_layerTreeHost->setShowFPSCounter(show); | 196 m_layerTreeHost->setShowFPSCounter(show); |
| 190 } | 197 } |
| 191 | 198 |
| 192 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT
able[128], int fontHeight) { | 199 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT
able[128], int fontHeight) { |
| 193 setFontAtlas(asciiToWebRectTable, bitmap, fontHeight); | 200 setFontAtlas(asciiToWebRectTable, bitmap, fontHeight); |
| 194 } | 201 } |
| 195 | 202 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 { | 277 { |
| 271 m_client->didCompleteSwapBuffers(); | 278 m_client->didCompleteSwapBuffers(); |
| 272 } | 279 } |
| 273 | 280 |
| 274 void WebLayerTreeViewImpl::scheduleComposite() | 281 void WebLayerTreeViewImpl::scheduleComposite() |
| 275 { | 282 { |
| 276 m_client->scheduleComposite(); | 283 m_client->scheduleComposite(); |
| 277 } | 284 } |
| 278 | 285 |
| 279 } // namespace WebKit | 286 } // namespace WebKit |
| OLD | NEW |