| 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 "web_layer_tree_view_impl.h" | 6 #include "web_layer_tree_view_impl.h" |
| 7 | 7 |
| 8 #include "cc/font_atlas.h" | 8 #include "cc/font_atlas.h" |
| 9 #include "cc/input_handler.h" | 9 #include "cc/input_handler.h" |
| 10 #include "cc/layer.h" | 10 #include "cc/layer.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 stats.numFramesSentToScreen = ccStats.numFramesSentToScreen; | 186 stats.numFramesSentToScreen = ccStats.numFramesSentToScreen; |
| 187 stats.droppedFrameCount = ccStats.droppedFrameCount; | 187 stats.droppedFrameCount = ccStats.droppedFrameCount; |
| 188 stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; | 188 stats.totalPaintTimeInSeconds = ccStats.totalPaintTimeInSeconds; |
| 189 stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; | 189 stats.totalRasterizeTimeInSeconds = ccStats.totalRasterizeTimeInSeconds; |
| 190 stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; | 190 stats.totalCommitTimeInSeconds = ccStats.totalCommitTimeInSeconds; |
| 191 stats.totalCommitCount = ccStats.totalCommitCount; | 191 stats.totalCommitCount = ccStats.totalCommitCount; |
| 192 stats.numImplThreadScrolls = ccStats.numImplThreadScrolls; | 192 stats.numImplThreadScrolls = ccStats.numImplThreadScrolls; |
| 193 stats.numMainThreadScrolls = ccStats.numMainThreadScrolls; | 193 stats.numMainThreadScrolls = ccStats.numMainThreadScrolls; |
| 194 } | 194 } |
| 195 | 195 |
| 196 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT
able[128], int fontHeight) | 196 void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT
able[128], int fontHeight) { |
| 197 setFontAtlas(asciiToWebRectTable, bitmap, fontHeight); |
| 198 } |
| 199 |
| 200 void WebLayerTreeViewImpl::setFontAtlas(WebRect asciiToWebRectTable[128], const
SkBitmap& bitmap, int fontHeight) |
| 197 { | 201 { |
| 198 gfx::Rect asciiToRectTable[128]; | 202 gfx::Rect asciiToRectTable[128]; |
| 199 for (int i = 0; i < 128; ++i) | 203 for (int i = 0; i < 128; ++i) |
| 200 asciiToRectTable[i] = asciiToWebRectTable[i]; | 204 asciiToRectTable[i] = asciiToWebRectTable[i]; |
| 201 scoped_ptr<FontAtlas> fontAtlas = FontAtlas::create(bitmap, asciiToRectTable
, fontHeight); | 205 scoped_ptr<FontAtlas> fontAtlas = FontAtlas::create(bitmap, asciiToRectTable
, fontHeight); |
| 202 m_layerTreeHost->setFontAtlas(fontAtlas.Pass()); | 206 m_layerTreeHost->setFontAtlas(fontAtlas.Pass()); |
| 203 } | 207 } |
| 204 | 208 |
| 205 void WebLayerTreeViewImpl::loseCompositorContext(int numTimes) | 209 void WebLayerTreeViewImpl::loseCompositorContext(int numTimes) |
| 206 { | 210 { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 { | 274 { |
| 271 m_client->didCompleteSwapBuffers(); | 275 m_client->didCompleteSwapBuffers(); |
| 272 } | 276 } |
| 273 | 277 |
| 274 void WebLayerTreeViewImpl::scheduleComposite() | 278 void WebLayerTreeViewImpl::scheduleComposite() |
| 275 { | 279 { |
| 276 m_client->scheduleComposite(); | 280 m_client->scheduleComposite(); |
| 277 } | 281 } |
| 278 | 282 |
| 279 } // namespace WebKit | 283 } // namespace WebKit |
| OLD | NEW |