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

Side by Side Diff: cc/layer_impl.cc

Issue 11369144: ui: Make gfx::Point::Scale() mutate the class, similar to gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for aura 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
« no previous file with comments | « ash/touch/touch_uma.cc ('k') | cc/layer_tree_host_impl.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 "cc/layer_impl.h" 7 #include "cc/layer_impl.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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 208
209 if (!screenSpaceTransform().isInvertible()) { 209 if (!screenSpaceTransform().isInvertible()) {
210 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored nonInvertibleTransform "); 210 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored nonInvertibleTransform ");
211 return InputHandlerClient::ScrollIgnored; 211 return InputHandlerClient::ScrollIgnored;
212 } 212 }
213 213
214 if (!nonFastScrollableRegion().IsEmpty()) { 214 if (!nonFastScrollableRegion().IsEmpty()) {
215 bool clipped = false; 215 bool clipped = false;
216 gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(screenSp aceTransform().inverse(), screenSpacePoint, clipped); 216 gfx::PointF hitTestPointInContentSpace = MathUtil::projectPoint(screenSp aceTransform().inverse(), screenSpacePoint, clipped);
217 gfx::PointF hitTestPointInLayerSpace = hitTestPointInContentSpace.Scale( 1 / contentsScaleX(), 1 / contentsScaleY()); 217 gfx::PointF hitTestPointInLayerSpace = gfx::ScalePoint(hitTestPointInCon tentSpace, 1 / contentsScaleX(), 1 / contentsScaleY());
sky 2012/11/09 16:54:53 Dare I ask, how come the code in cc isn't followin
danakj 2012/11/09 17:04:25 We've fixed some of the style guide rules, but not
218 if (!clipped && nonFastScrollableRegion().Contains(gfx::ToRoundedPoint(h itTestPointInLayerSpace))) { 218 if (!clipped && nonFastScrollableRegion().Contains(gfx::ToRoundedPoint(h itTestPointInLayerSpace))) {
219 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed nonFastScrollableRe gion"); 219 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed nonFastScrollableRe gion");
220 return InputHandlerClient::ScrollOnMainThread; 220 return InputHandlerClient::ScrollOnMainThread;
221 } 221 }
222 } 222 }
223 223
224 if (type == InputHandlerClient::Wheel && haveWheelEventHandlers()) { 224 if (type == InputHandlerClient::Wheel && haveWheelEventHandlers()) {
225 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed wheelEventHandlers"); 225 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed wheelEventHandlers");
226 return InputHandlerClient::ScrollOnMainThread; 226 return InputHandlerClient::ScrollOnMainThread;
227 } 227 }
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 701
702 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) 702 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer)
703 { 703 {
704 if (!m_scrollbarAnimationController) 704 if (!m_scrollbarAnimationController)
705 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); 705 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is);
706 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 706 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
707 m_scrollbarAnimationController->updateScrollOffset(this); 707 m_scrollbarAnimationController->updateScrollOffset(this);
708 } 708 }
709 709
710 } // namespace cc 710 } // namespace cc
OLDNEW
« no previous file with comments | « ash/touch/touch_uma.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698