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

Side by Side Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

Issue 12212099: cc: remove FontAtlas (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 182043 Created 7 years, 10 months 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 unified diff | Download patch
OLDNEW
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "cc/font_atlas.h"
10 #include "cc/input_handler.h" 9 #include "cc/input_handler.h"
11 #include "cc/layer.h" 10 #include "cc/layer.h"
12 #include "cc/layer_tree_host.h" 11 #include "cc/layer_tree_host.h"
13 #include "cc/thread.h" 12 #include "cc/thread.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h" 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h"
18 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h " 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h "
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 m_layerTreeHost->setDebugState(debugState); 206 m_layerTreeHost->setDebugState(debugState);
208 } 207 }
209 208
210 void WebLayerTreeViewImpl::setContinuousPaintingEnabled(bool enabled) 209 void WebLayerTreeViewImpl::setContinuousPaintingEnabled(bool enabled)
211 { 210 {
212 LayerTreeDebugState debugState = m_layerTreeHost->debugState(); 211 LayerTreeDebugState debugState = m_layerTreeHost->debugState();
213 debugState.continuousPainting = enabled; 212 debugState.continuousPainting = enabled;
214 m_layerTreeHost->setDebugState(debugState); 213 m_layerTreeHost->setDebugState(debugState);
215 } 214 }
216 215
217 scoped_ptr<FontAtlas> WebLayerTreeViewImpl::createFontAtlas()
218 {
219 int fontHeight;
220 WebRect asciiToWebRectTable[128];
221 gfx::Rect asciiToRectTable[128];
222 SkBitmap bitmap;
223
224 m_client->createFontAtlas(bitmap, asciiToWebRectTable, fontHeight);
225
226 for (int i = 0; i < 128; ++i)
227 asciiToRectTable[i] = asciiToWebRectTable[i];
228
229 return FontAtlas::create(bitmap, asciiToRectTable, fontHeight).Pass();
230 }
231
232 void WebLayerTreeViewImpl::willBeginFrame() 216 void WebLayerTreeViewImpl::willBeginFrame()
233 { 217 {
234 m_client->willBeginFrame(); 218 m_client->willBeginFrame();
235 } 219 }
236 220
237 void WebLayerTreeViewImpl::didBeginFrame() 221 void WebLayerTreeViewImpl::didBeginFrame()
238 { 222 {
239 m_client->didBeginFrame(); 223 m_client->didBeginFrame();
240 } 224 }
241 225
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 { 277 {
294 m_client->didCompleteSwapBuffers(); 278 m_client->didCompleteSwapBuffers();
295 } 279 }
296 280
297 void WebLayerTreeViewImpl::scheduleComposite() 281 void WebLayerTreeViewImpl::scheduleComposite()
298 { 282 {
299 m_client->scheduleComposite(); 283 m_client->scheduleComposite();
300 } 284 }
301 285
302 } // namespace WebKit 286 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698