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

Side by Side Diff: cc/layer_tree_host.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compile error 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 unified diff | Download patch | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/layer_tree_host.h" 7 #include "cc/layer_tree_host.h"
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 29 matching lines...) Expand all
40 LayerTreeSettings::LayerTreeSettings() 40 LayerTreeSettings::LayerTreeSettings()
41 : acceleratePainting(false) 41 : acceleratePainting(false)
42 , showPlatformLayerTree(false) 42 , showPlatformLayerTree(false)
43 , showPaintRects(false) 43 , showPaintRects(false)
44 , showPropertyChangedRects(false) 44 , showPropertyChangedRects(false)
45 , showSurfaceDamageRects(false) 45 , showSurfaceDamageRects(false)
46 , showScreenSpaceRects(false) 46 , showScreenSpaceRects(false)
47 , showReplicaScreenSpaceRects(false) 47 , showReplicaScreenSpaceRects(false)
48 , showOccludingRects(false) 48 , showOccludingRects(false)
49 , renderVSyncEnabled(true) 49 , renderVSyncEnabled(true)
50 , canUseLCDText(true)
50 , refreshRate(0) 51 , refreshRate(0)
51 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) 52 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max())
52 , defaultTileSize(gfx::Size(256, 256)) 53 , defaultTileSize(gfx::Size(256, 256))
53 , maxUntiledLayerSize(gfx::Size(512, 512)) 54 , maxUntiledLayerSize(gfx::Size(512, 512))
54 , minimumOcclusionTrackingSize(gfx::Size(160, 160)) 55 , minimumOcclusionTrackingSize(gfx::Size(160, 160))
55 { 56 {
57 // FIXME: Remove this hard-coded setting.
58 // Platforms that need to disable LCD text must explicitly set this value.
59 #if OS(ANDROID)
60 canUseLCDText = false;
61 #endif
56 } 62 }
57 63
58 LayerTreeSettings::~LayerTreeSettings() 64 LayerTreeSettings::~LayerTreeSettings()
59 { 65 {
60 } 66 }
61 67
62 RendererCapabilities::RendererCapabilities() 68 RendererCapabilities::RendererCapabilities()
63 : bestTextureFormat(0) 69 : bestTextureFormat(0)
64 , contextHasCachedFrontBuffer(false) 70 , contextHasCachedFrontBuffer(false)
65 , usingPartialSwap(false) 71 , usingPartialSwap(false)
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 LayerList updateList; 547 LayerList updateList;
542 548
543 { 549 {
544 if (Settings::pageScalePinchZoomEnabled()) { 550 if (Settings::pageScalePinchZoomEnabled()) {
545 Layer* rootScroll = findFirstScrollableLayer(rootLayer); 551 Layer* rootScroll = findFirstScrollableLayer(rootLayer);
546 if (rootScroll) 552 if (rootScroll)
547 rootScroll->setImplTransform(m_implTransform); 553 rootScroll->setImplTransform(m_implTransform);
548 } 554 }
549 555
550 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::calcDrawEtc"); 556 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::calcDrawEtc");
551 LayerTreeHostCommon::calculateDrawTransforms(rootLayer, deviceViewportSi ze(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureS ize, updateList); 557 LayerTreeHostCommon::calculateDrawTransforms(rootLayer, deviceViewportSi ze(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureS ize, m_settings.canUseLCDText, updateList);
552 } 558 }
553 559
554 // Reset partial texture update requests. 560 // Reset partial texture update requests.
555 m_partialTextureUpdateRequests = 0; 561 m_partialTextureUpdateRequests = 0;
556 562
557 bool needMoreUpdates = paintLayerContents(updateList, queue); 563 bool needMoreUpdates = paintLayerContents(updateList, queue);
558 if (m_triggerIdleUpdates && needMoreUpdates) { 564 if (m_triggerIdleUpdates && needMoreUpdates) {
559 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::posting prepaint task") ; 565 TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::posting prepaint task") ;
560 m_prepaintCallback.Reset(base::Bind(&LayerTreeHost::triggerPrepaint, bas e::Unretained(this))); 566 m_prepaintCallback.Reset(base::Bind(&LayerTreeHost::triggerPrepaint, bas e::Unretained(this)));
561 static base::TimeDelta prepaintDelay = base::TimeDelta::FromMilliseconds (100); 567 static base::TimeDelta prepaintDelay = base::TimeDelta::FromMilliseconds (100);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 else 846 else
841 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 847 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
842 } 848 }
843 } 849 }
844 850
845 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 851 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
846 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 852 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
847 } 853 }
848 854
849 } // namespace cc 855 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_common.h » ('j') | cc/layer_tree_host_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698