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

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

Issue 11413123: cc: switch to new WebLayerTreeViewClient API for requesting font atlas (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed WebKit tests for patch #1 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 side-by-side diff with in-line comments
Download patch
Index: webkit/compositor_bindings/web_layer_tree_view_impl.cc
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl.cc b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
index 571fadb3c2e851790606098f1249d170f2952db4..aa3c9fce5f893af872432e65939a7e8c5f5be3d0 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -193,17 +193,19 @@ void WebLayerTreeViewImpl::setShowFPSCounter(bool show)
m_layerTreeHost->setShowFPSCounter(show);
}
-void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectTable[128], int fontHeight) {
- setFontAtlas(asciiToWebRectTable, bitmap, fontHeight);
-}
-
-void WebLayerTreeViewImpl::setFontAtlas(WebRect asciiToWebRectTable[128], const SkBitmap& bitmap, int fontHeight)
+scoped_ptr<FontAtlas> WebLayerTreeViewImpl::createFontAtlas()
{
+ int fontHeight;
+ WebRect asciiToWebRectTable[128];
gfx::Rect asciiToRectTable[128];
+ SkBitmap bitmap;
+
+ m_client->createFontAtlas(bitmap, asciiToWebRectTable, fontHeight);
+
for (int i = 0; i < 128; ++i)
asciiToRectTable[i] = asciiToWebRectTable[i];
- scoped_ptr<FontAtlas> fontAtlas = FontAtlas::create(bitmap, asciiToRectTable, fontHeight);
- m_layerTreeHost->setFontAtlas(fontAtlas.Pass());
+
+ return FontAtlas::create(bitmap, asciiToRectTable, fontHeight).Pass();
}
void WebLayerTreeViewImpl::loseCompositorContext(int numTimes)
« cc/layer_tree_host_client.h ('K') | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698