aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRegion.h
Commit message (Collapse)AuthorAge
* use 64bit math to compute is a rect is emptyGravatar Mike Reed2018-01-09
| | | | | | | | | | | Will work next to try to make isEmpty() private Bug: skia:7470 Bug:799715 Change-Id: I7b43028ecd86dca68e0c67225712516d2f2f88a2 Reviewed-on: https://skia-review.googlesource.com/92620 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkRegion deserialization more robustGravatar Hal Canary2017-02-18
| | | | | | | | BUG=chromium:688987 Change-Id: Ide6d70330c8cd1fce814eb2c445da1fbff498ef6 Reviewed-on: https://skia-review.googlesource.com/8496 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* inline very common intersect+rect_rgnGravatar reed2016-06-30
| | | | | | | | | | | | | Extracted from previous compound CL (with other changes). This is the very common case for clips, and inlining this eliminates a series of function calls. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2116513002 TBR=mtklein Review-Url: https://codereview.chromium.org/2116513002
* Remove useless SkASSERT in SkRect.h and SkRegion.hGravatar dongseong.hwang2015-04-28
| | | | | | | | | The pointer of reference is always not-null. It causes >50k lines of warnning when chromium is compiled by clang. Warning looks like ../../third_party/skia/include/core/SkRect.h:284:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] do { if (&r) break; SkNO_RETURN_HINT(); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, false, "%s:%d: failed assertion \"%s\"\n", "../../third_party/skia/include/core/SkRect.h", 284, "&r"); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, true, "SK_CRASH"); } while (false); Review URL: https://codereview.chromium.org/1111013002
* Add dump() to SkClipStack to help with debugging.Gravatar bsalomon2014-06-09
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/311263015
* Checking structure sizes before reading them from memory to avoid ↵Gravatar commit-bot@chromium.org2013-11-05
| | | | | | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com, mtklein@google.com, senorblanco@chromium.org Committed: https://code.google.com/p/skia/source/detail?r=12114 Committed: https://code.google.com/p/skia/source/detail?r=12119 Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12130 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Checking structure sizes before reading them from memory to avoid ↵Gravatar reed@google.com2013-11-04
| | | | | | | | overflowing the buffer's stream." This reverts commit 6bc22e8ef1ea70a1b58409aa21254358c50f149a. git-svn-id: http://skia.googlecode.com/svn/trunk@12124 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=12114 Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12119 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r12114 due to https://code.google.com/p/skia/issues/detail?id=1794 ↵Gravatar epoger@google.com2013-11-04
| | | | | | ('Assertion failures on various buildbots as of r12114') git-svn-id: http://skia.googlecode.com/svn/trunk@12115 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12114 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add getRectCount to SkRegtionGravatar commit-bot@chromium.org2013-07-17
| | | | | | | | | | | | | | | | | It is useful to know how many rects comprise a region, since in some situations we can optimize code based on the complexity of the region. For instance, if we use SkRegion for tracking invalidation we might opt to use the region bounds as invalidation instead of iterating over each rect. R=reed@google.com, tomhudson@chromium.org, caryclark@google.com, robertphillips@google.com Author: vmpstr@chromium.org Review URL: https://chromiumcodereview.appspot.com/19366008 git-svn-id: http://skia.googlecode.com/svn/trunk@10129 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename the existing flatten(void*) methods.Gravatar djsollen@google.com2012-06-08
| | | | | | | | This change avoids naminc confusion with the SkFlattenable flatten methods and also changes SkPath to use the void* model instead of taking a SkReader32. Review URL: https://codereview.appspot.com/6299062 git-svn-id: http://skia.googlecode.com/svn/trunk@4215 2bbb7eff-a529-9590-31e7-b0007b416f81
* store x-interval-count per scanline, so we can skip lines in O(1)Gravatar reed@google.com2012-05-02
| | | | | | Review URL: https://codereview.appspot.com/6147043 git-svn-id: http://skia.googlecode.com/svn/trunk@3825 2bbb7eff-a529-9590-31e7-b0007b416f81
* record yspancount and intervalcount in regionsGravatar reed@google.com2012-05-01
| | | | | | Review URL: https://codereview.appspot.com/6132055 git-svn-id: http://skia.googlecode.com/svn/trunk@3808 2bbb7eff-a529-9590-31e7-b0007b416f81
* Variant of SkRegion::op (called Oper) that either writes the result into a 3rdGravatar reed@google.com2012-04-30
| | | | | | | region (normal mode) or does a quick-return if the result will be non-empty (called for predicates like contains() and intersects()). git-svn-id: http://skia.googlecode.com/svn/trunk@3791 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkRegion::operator== a member function, rather than a privately-declaredGravatar reed@google.com2012-01-25
| | | | | | | | | | | friend. Without this, calling code has access to operator==, but can fail to link because the implementation is assumed to have static linkage. http://codereview.appspot.com/5577047/ git-svn-id: http://skia.googlecode.com/svn/trunk@3088 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update header comments to more accurately describe behavior ofGravatar tomhudson@google.com2012-01-03
| | | | | | | | | | SkRegion::getBoundaryPath(). Add SkASSERT of SkPath argument for safety. codereview.appspot.com/5504095/ git-svn-id: http://skia.googlecode.com/svn/trunk@2942 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update files to use SK_BUILD_FOR_ANDROID.Gravatar djsollen@google.com2011-11-08
| | | | | | | | This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initialize fClip in SkBounder, in case doIRect() is called before it is usedGravatar reed@google.com2011-03-23
| | | | | | | | | | inside a canvas (which calls setClip). Export a global empty region. Used by SkBounder's constructor. git-svn-id: http://skia.googlecode.com/svn/trunk@985 2bbb7eff-a529-9590-31e7-b0007b416f81
* change operator== to return bool instead of intGravatar reed@google.com2011-03-18
| | | | | | | | update dox formating git-svn-id: http://skia.googlecode.com/svn/trunk@956 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add code needed to build skia as a windows dll within the chromium project.Gravatar ctguil@chromium.org2011-03-15
| | | | | | | | | - Export/import skia APIs if SKIA_DLL is defined. - This change has no effect on skia. Review URL: http://codereview.appspot.com/4282042 git-svn-id: http://skia.googlecode.com/svn/trunk@944 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstreaming changes from android.Gravatar djsollen@google.com2011-03-14
| | | | | | | | | | - fix compile warnings in the GPU code - upstream android specific code (ifdef protected) - fail gracefully when a custom allocator fails git-svn-id: http://skia.googlecode.com/svn/trunk@936 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for clipstack to Gr. GrClip is now a list of rects and paths ↵Gravatar bsalomon@google.com2011-03-03
| | | | | | with set operations to combine them. The stencil buffer is used to perform the set operations to put the clip into the stencil buffer. Building Gr's clip from Skia's clipStack is currently disabled due to the fact that Skia's clipStack is relative to the root layer not the current layer. This will be fixed in a subsequent CL. git-svn-id: http://skia.googlecode.com/svn/trunk@878 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge with changes for GPU backendGravatar reed@android.com2010-12-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkRegion::setRects(), and its unit testsGravatar reed@android.com2010-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@588 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81