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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 479893002: Merge acceleratedCompositingForFixedRootBackground into preferCompositingToLCDText (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 context.translate(-scrollCorner.x(), -scrollCorner.y()); 782 context.translate(-scrollCorner.x(), -scrollCorner.y());
783 IntRect transformedClip = clip; 783 IntRect transformedClip = clip;
784 transformedClip.moveBy(scrollCorner.location()); 784 transformedClip.moveBy(scrollCorner.location());
785 m_renderView.frameView()->paintScrollCorner(&context, transformedClip); 785 m_renderView.frameView()->paintScrollCorner(&context, transformedClip);
786 context.restore(); 786 context.restore();
787 } 787 }
788 } 788 }
789 789
790 bool RenderLayerCompositor::supportsFixedRootBackgroundCompositing() const 790 bool RenderLayerCompositor::supportsFixedRootBackgroundCompositing() const
791 { 791 {
792 if (Settings* settings = m_renderView.document().settings()) { 792 if (Settings* settings = m_renderView.document().settings())
793 if (settings->acceleratedCompositingForFixedRootBackgroundEnabled()) 793 return settings->preferCompositingToLCDTextEnabled();
794 return true;
795 }
796 return false; 794 return false;
797 } 795 }
798 796
799 bool RenderLayerCompositor::needsFixedRootBackgroundLayer(const RenderLayer* lay er) const 797 bool RenderLayerCompositor::needsFixedRootBackgroundLayer(const RenderLayer* lay er) const
800 { 798 {
801 if (layer != m_renderView.layer()) 799 if (layer != m_renderView.layer())
802 return false; 800 return false;
803 801
804 return supportsFixedRootBackgroundCompositing() && m_renderView.rootBackgrou ndIsEntirelyFixed(); 802 return supportsFixedRootBackgroundCompositing() && m_renderView.rootBackgrou ndIsEntirelyFixed();
805 } 803 }
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } else if (graphicsLayer == m_scrollLayer.get()) { 1164 } else if (graphicsLayer == m_scrollLayer.get()) {
1167 name = "LocalFrame Scrolling Layer"; 1165 name = "LocalFrame Scrolling Layer";
1168 } else { 1166 } else {
1169 ASSERT_NOT_REACHED(); 1167 ASSERT_NOT_REACHED();
1170 } 1168 }
1171 1169
1172 return name; 1170 return name;
1173 } 1171 }
1174 1172
1175 } // namespace blink 1173 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/window-resize-background-image-fixed-centered-composited.html ('k') | Source/web/WebSettingsImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698