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

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: Fixing tests 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 a983a9e38b6e0610971b9aebb16f924dc87c1bbb..1bd44a3eec5f79073d9fa0c4520ad93c6343a5bd 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -185,17 +185,19 @@ void WebLayerTreeViewImpl::setShowFPSCounter(bool show)
m_layerTreeHost->setDebugState(debugState);
}
-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.cc ('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