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

Side by Side Diff: cc/layer_impl.cc

Issue 11186039: Move CC switches to cc/switches.h. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Switch ui/compositor back to using compositorSupport() Created 8 years, 2 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.cc ('k') | cc/layer_tree_host.cc » ('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 "config.h" 5 #include "config.h"
6 6
7 #include "CCLayerImpl.h" 7 #include "CCLayerImpl.h"
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if (!scrollable()) { 220 if (!scrollable()) {
221 TRACE_EVENT0("cc", "CCLayerImpl::tryScroll: Ignored not scrollable"); 221 TRACE_EVENT0("cc", "CCLayerImpl::tryScroll: Ignored not scrollable");
222 return CCInputHandlerClient::ScrollIgnored; 222 return CCInputHandlerClient::ScrollIgnored;
223 } 223 }
224 224
225 return CCInputHandlerClient::ScrollStarted; 225 return CCInputHandlerClient::ScrollStarted;
226 } 226 }
227 227
228 bool CCLayerImpl::drawCheckerboardForMissingTiles() const 228 bool CCLayerImpl::drawCheckerboardForMissingTiles() const
229 { 229 {
230 return m_drawCheckerboardForMissingTiles && !CCSettings::backgroundColorInst eadOfCheckerboard(); 230 return m_drawCheckerboardForMissingTiles && !Settings::backgroundColorInstea dOfCheckerboard();
231 } 231 }
232 232
233 IntRect CCLayerImpl::layerRectToContentRect(const WebKit::WebRect& layerRect) 233 IntRect CCLayerImpl::layerRectToContentRect(const WebKit::WebRect& layerRect)
234 { 234 {
235 float widthScale = static_cast<float>(contentBounds().width()) / bounds().wi dth(); 235 float widthScale = static_cast<float>(contentBounds().width()) / bounds().wi dth();
236 float heightScale = static_cast<float>(contentBounds().height()) / bounds(). height(); 236 float heightScale = static_cast<float>(contentBounds().height()) / bounds(). height();
237 FloatRect contentRect(layerRect.x, layerRect.y, layerRect.width, layerRect.h eight); 237 FloatRect contentRect(layerRect.x, layerRect.y, layerRect.width, layerRect.h eight);
238 contentRect.scale(widthScale, heightScale); 238 contentRect.scale(widthScale, heightScale);
239 return enclosingIntRect(contentRect); 239 return enclosingIntRect(contentRect);
240 } 240 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 671
672 void CCLayerImpl::setVerticalScrollbarLayer(CCScrollbarLayerImpl* scrollbarLayer ) 672 void CCLayerImpl::setVerticalScrollbarLayer(CCScrollbarLayerImpl* scrollbarLayer )
673 { 673 {
674 if (!m_scrollbarAnimationController) 674 if (!m_scrollbarAnimationController)
675 m_scrollbarAnimationController = CCScrollbarAnimationController::create( this); 675 m_scrollbarAnimationController = CCScrollbarAnimationController::create( this);
676 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 676 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
677 m_scrollbarAnimationController->updateScrollOffset(this); 677 m_scrollbarAnimationController->updateScrollOffset(this);
678 } 678 }
679 679
680 } 680 }
OLDNEW
« no previous file with comments | « cc/layer.cc ('k') | cc/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698