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

Side by Side Diff: Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 1259973002: Canvas2d: Remove unnecessary conversion in EventHitRegion. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
10 * 10 *
(...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 if (m_hitRegionManager) 2232 if (m_hitRegionManager)
2233 m_hitRegionManager->removeHitRegionById(id); 2233 m_hitRegionManager->removeHitRegionById(id);
2234 } 2234 }
2235 2235
2236 void CanvasRenderingContext2D::clearHitRegions() 2236 void CanvasRenderingContext2D::clearHitRegions()
2237 { 2237 {
2238 if (m_hitRegionManager) 2238 if (m_hitRegionManager)
2239 m_hitRegionManager->removeAllHitRegions(); 2239 m_hitRegionManager->removeAllHitRegions();
2240 } 2240 }
2241 2241
2242 HitRegion* CanvasRenderingContext2D::hitRegionAtPoint(const LayoutPoint& point) 2242 HitRegion* CanvasRenderingContext2D::hitRegionAtPoint(const FloatPoint& point)
2243 { 2243 {
2244 if (m_hitRegionManager) 2244 if (m_hitRegionManager)
2245 return m_hitRegionManager->getHitRegionAtPoint(point); 2245 return m_hitRegionManager->getHitRegionAtPoint(point);
2246 2246
2247 return nullptr; 2247 return nullptr;
2248 } 2248 }
2249 2249
2250 unsigned CanvasRenderingContext2D::hitRegionsCount() const 2250 unsigned CanvasRenderingContext2D::hitRegionsCount() const
2251 { 2251 {
2252 if (m_hitRegionManager) 2252 if (m_hitRegionManager)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage) 2316 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage)
2317 return; 2317 return;
2318 if (alpha < 0xFF) 2318 if (alpha < 0xFF)
2319 return; 2319 return;
2320 } 2320 }
2321 2321
2322 canvas()->buffer()->willOverwriteCanvas(); 2322 canvas()->buffer()->willOverwriteCanvas();
2323 } 2323 }
2324 2324
2325 } // namespace blink 2325 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/canvas2d/CanvasRenderingContext2D.h ('k') | Source/modules/canvas2d/EventHitRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698