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 "config.h" | 5 #include "config.h" |
6 #include "WebLayerTreeViewImpl.h" | 6 #include "WebLayerTreeViewImpl.h" |
7 | 7 |
8 #include "WebLayerImpl.h" | 8 #include "WebLayerImpl.h" |
9 #include "WebToCCInputHandlerAdapter.h" | 9 #include "WebToCCInputHandlerAdapter.h" |
10 #include "cc/font_atlas.h" | 10 #include "cc/font_atlas.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 void WebLayerTreeViewImpl::finishAllRendering() | 163 void WebLayerTreeViewImpl::finishAllRendering() |
164 { | 164 { |
165 m_layerTreeHost->finishAllRendering(); | 165 m_layerTreeHost->finishAllRendering(); |
166 } | 166 } |
167 | 167 |
168 void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const | 168 void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const |
169 { | 169 { |
170 CCRenderingStats ccStats; | 170 CCRenderingStats ccStats; |
171 m_layerTreeHost->renderingStats(&ccStats); | 171 m_layerTreeHost->renderingStats(&ccStats); |
172 | 172 |
173 stats.numAnimationFrames = ccStats.numAnimationFrames; | 173 stats.vsyncCount = ccStats.vsyncCount; |
174 stats.numFramesSentToScreen = ccStats.numFramesSentToScreen; | 174 stats.rendererFrameCount = ccStats.rendererFrameCount; |
| 175 stats.mainAnimationFrameCount = ccStats.mainAnimationFrameCount; |
| 176 stats.implAnimationFrameCount = ccStats.implAnimationFrameCount; |
175 stats.droppedFrameCount = ccStats.droppedFrameCount; | 177 stats.droppedFrameCount = ccStats.droppedFrameCount; |
176 stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; | 178 stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; |
177 stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; | 179 stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; |
178 stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; | 180 stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; |
179 stats.totalCommitCount = ccStats.totalCommitCount; | 181 stats.totalCommitCount = ccStats.totalCommitCount; |
180 stats.numImplThreadScrolls = ccStats.numImplThreadScrolls; | 182 stats.implThreadScrollCount = ccStats.implThreadScrollCount; |
181 stats.numMainThreadScrolls = ccStats.numMainThreadScrolls; | 183 stats.mainThreadScrollCount = ccStats.mainThreadScrollCount; |
182 } | 184 } |
183 | 185 |
184 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT
able[128], int fontHeight) | 186 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT
able[128], int fontHeight) |
185 { | 187 { |
186 IntRect asciiToRectTable[128]; | 188 IntRect asciiToRectTable[128]; |
187 for (int i = 0; i < 128; ++i) | 189 for (int i = 0; i < 128; ++i) |
188 asciiToRectTable[i] = convert(asciiToWebRectTable[i]); | 190 asciiToRectTable[i] = convert(asciiToWebRectTable[i]); |
189 scoped_ptr<CCFontAtlas> fontAtlas = CCFontAtlas::create(bitmap, asciiToRectT
able, fontHeight); | 191 scoped_ptr<CCFontAtlas> fontAtlas = CCFontAtlas::create(bitmap, asciiToRectT
able, fontHeight); |
190 m_layerTreeHost->setFontAtlas(fontAtlas.Pass()); | 192 m_layerTreeHost->setFontAtlas(fontAtlas.Pass()); |
191 } | 193 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 { | 260 { |
259 m_client->didCompleteSwapBuffers(); | 261 m_client->didCompleteSwapBuffers(); |
260 } | 262 } |
261 | 263 |
262 void WebLayerTreeViewImpl::scheduleComposite() | 264 void WebLayerTreeViewImpl::scheduleComposite() |
263 { | 265 { |
264 m_client->scheduleComposite(); | 266 m_client->scheduleComposite(); |
265 } | 267 } |
266 | 268 |
267 } // namespace WebKit | 269 } // namespace WebKit |
OLD | NEW |