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

Side by Side Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 352793006: context.addHitRegion() is not working when using transform operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: state stack Created 6 years, 5 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 | « Source/platform/graphics/GraphicsContext.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 SkPath& path = const_cast<SkPath&>(pathToClip.skPath()); 1381 SkPath& path = const_cast<SkPath&>(pathToClip.skPath());
1382 SkPath::FillType previousFillType = path.getFillType(); 1382 SkPath::FillType previousFillType = path.getFillType();
1383 1383
1384 SkPath::FillType temporaryFillType = clipRule == RULE_EVENODD ? SkPath::kEve nOdd_FillType : SkPath::kWinding_FillType; 1384 SkPath::FillType temporaryFillType = clipRule == RULE_EVENODD ? SkPath::kEve nOdd_FillType : SkPath::kWinding_FillType;
1385 path.setFillType(temporaryFillType); 1385 path.setFillType(temporaryFillType);
1386 clipPath(path, AntiAliased); 1386 clipPath(path, AntiAliased);
1387 1387
1388 path.setFillType(previousFillType); 1388 path.setFillType(previousFillType);
1389 } 1389 }
1390 1390
1391 bool GraphicsContext::isClipMode() const
1392 {
1393 if (contextDisabled())
1394 return false;
1395
1396 return m_canvas->getClipStack()->getSaveCount() != 0;
1397 }
1398
1399 void GraphicsContext::clipConvexPolygon(size_t numPoints, const FloatPoint* poin ts, bool antialiased) 1391 void GraphicsContext::clipConvexPolygon(size_t numPoints, const FloatPoint* poin ts, bool antialiased)
1400 { 1392 {
1401 if (contextDisabled()) 1393 if (contextDisabled())
1402 return; 1394 return;
1403 1395
1404 if (numPoints <= 1) 1396 if (numPoints <= 1)
1405 return; 1397 return;
1406 1398
1407 SkPath path; 1399 SkPath path;
1408 setPathFromConvexPoints(&path, numPoints, points); 1400 setPathFromConvexPoints(&path, numPoints, points);
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 1831
1840 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) 1832 void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
1841 { 1833 {
1842 if (m_trackTextRegion) { 1834 if (m_trackTextRegion) {
1843 TRACE_EVENT0("skia", "GraphicsContext::didDrawTextInRect"); 1835 TRACE_EVENT0("skia", "GraphicsContext::didDrawTextInRect");
1844 m_textRegion.join(textRect); 1836 m_textRegion.join(textRect);
1845 } 1837 }
1846 } 1838 }
1847 1839
1848 } 1840 }
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698