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

Side by Side Diff: cc/layer_tree_host.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
« no previous file with comments | « cc/layer_tree_debug_state.cc ('k') | cc/layer_tree_host_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "cc/animation_registrar.h" 12 #include "cc/animation_registrar.h"
13 #include "cc/font_atlas.h"
14 #include "cc/heads_up_display_layer.h" 13 #include "cc/heads_up_display_layer.h"
15 #include "cc/heads_up_display_layer_impl.h" 14 #include "cc/heads_up_display_layer_impl.h"
16 #include "cc/layer.h" 15 #include "cc/layer.h"
17 #include "cc/layer_animation_controller.h" 16 #include "cc/layer_animation_controller.h"
18 #include "cc/layer_iterator.h" 17 #include "cc/layer_iterator.h"
19 #include "cc/layer_tree_host_client.h" 18 #include "cc/layer_tree_host_client.h"
20 #include "cc/layer_tree_host_common.h" 19 #include "cc/layer_tree_host_common.h"
21 #include "cc/layer_tree_host_impl.h" 20 #include "cc/layer_tree_host_impl.h"
22 #include "cc/layer_tree_impl.h" 21 #include "cc/layer_tree_impl.h"
23 #include "cc/math_util.h" 22 #include "cc/math_util.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 332 }
334 333
335 void LayerTreeHost::willCommit() 334 void LayerTreeHost::willCommit()
336 { 335 {
337 m_client->willCommit(); 336 m_client->willCommit();
338 337
339 if (m_debugState.showHudInfo()) { 338 if (m_debugState.showHudInfo()) {
340 if (!m_hudLayer) 339 if (!m_hudLayer)
341 m_hudLayer = HeadsUpDisplayLayer::create(); 340 m_hudLayer = HeadsUpDisplayLayer::create();
342 341
343 if (m_debugState.hudNeedsFont() && !m_hudLayer->hasFontAtlas())
344 m_hudLayer->setFontAtlas(m_client->createFontAtlas());
345
346 if (m_rootLayer && !m_hudLayer->parent()) 342 if (m_rootLayer && !m_hudLayer->parent())
347 m_rootLayer->addChild(m_hudLayer); 343 m_rootLayer->addChild(m_hudLayer);
348 } else if (m_hudLayer) { 344 } else if (m_hudLayer) {
349 m_hudLayer->removeFromParent(); 345 m_hudLayer->removeFromParent();
350 m_hudLayer = 0; 346 m_hudLayer = 0;
351 } 347 }
352 } 348 }
353 349
354 void LayerTreeHost::commitComplete() 350 void LayerTreeHost::commitComplete()
355 { 351 {
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 873 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
878 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 874 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
879 } 875 }
880 876
881 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture() 877 skia::RefPtr<SkPicture> LayerTreeHost::capturePicture()
882 { 878 {
883 return m_proxy->capturePicture(); 879 return m_proxy->capturePicture();
884 } 880 }
885 881
886 } // namespace cc 882 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_debug_state.cc ('k') | cc/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698