Go to file
mtklein 6f07665768 Simplify SkInstCnt
This code requires fewer macros to use it (just one), has less code in macro
definitions, and has simpler synchronization code (just atomic ints, no SkOnce,
no SkMutex, etc.)

A minor downside, we lose indentation and reverse-ordering in the final report:
  Leaked SkRefCntBase: 7
     Leaked SkFontMgr: 1
     Leaked SkWeakRefCnt: 1
         Leaked SkTypeface: 1
     Leaked SkFlattenable: 3
         Leaked SkXfermode: 3
     Leaked SkPathRef: 1
     Leaked SkPixelRef: 1
         Leaked SkMallocPixelRef: 1
becomes
  Leaked SkXfermode: 3
  Leaked SkMallocPixelRef: 1
  Leaked SkPixelRef: 1
  Leaked SkPathRef: 1
  Leaked SkFlattenable: 3
  Leaked SkTypeface: 1
  Leaked SkWeakRefCnt: 1
  Leaked SkFontMgr: 1
  Leaked SkRefCntBase: 7

This is motivated by wanting to land https://codereview.chromium.org/806473006/,
which makes sure all static use of SkOnce are in global scope.  The current
implementation of SkInstCnt uses them in function scope, which isn't safe.
BUG=skia:

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/841263004
2015-01-13 08:22:44 -08:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
bin Don't count a leading 1 as a signficant digit in the ratio. 2014-11-24 17:44:23 -05:00
debugger debugger: Update inspector view data consistently while paused 2015-01-07 07:33:47 -08:00
dm add --rasterPDF flag to DM 2015-01-10 11:18:04 -08:00
docs Remove references to out/Debug/tests executable. 2014-10-09 08:56:55 -07:00
expectations Generic PDF shader fallback 2015-01-13 08:06:11 -08:00
experimental Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
forth Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
gm Revert of Fix GPU clipped-AA vs. non-AA drawRect discrepancy (patchset #2 id:20001 of https://codereview.chromium.org/839883003/) 2015-01-12 18:26:01 -08:00
gyp Revert of Fix GPU clipped-AA vs. non-AA drawRect discrepancy (patchset #2 id:20001 of https://codereview.chromium.org/839883003/) 2015-01-12 18:26:01 -08:00
include Simplify SkInstCnt 2015-01-13 08:22:44 -08:00
platform_tools Change DebugCanvas API to not encourage memory leaks 2014-12-30 07:22:58 -08:00
resources Remove PDF JPEG shortcut, since it fails on grayscale JPEGs. 2014-12-02 06:37:21 -08:00
samplecode Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
site Document some skia perf interesting queries. 2015-01-09 10:35:52 -08:00
src Simplify SkInstCnt 2015-01-13 08:22:44 -08:00
tests Simplify SkInstCnt 2015-01-13 08:22:44 -08:00
third_party DM warning-free on win64 2014-12-12 16:41:46 -08:00
tools Fix up all the easy virtual ... SK_OVERRIDE cases. 2015-01-09 10:06:40 -08:00
trybots_to_run/chrome Deleting the hardcoded list of compile bots in trybots_to_run. 2013-04-09 11:59:42 +00:00
.gitignore Cleanup: Remove bug_chomper entry from .gitignore. 2014-11-24 17:53:55 -08:00
AUTHORS Revert of Revert of Add gpu support for Apple specific 'Vertex Arrays' functions (patchset #1 id:1 of https://codereview.chromium.org/750973003/) 2014-11-24 11:22:37 -08:00
codereview.settings Add Project to skia 2014-06-20 09:39:15 -07:00
CONTRIBUTING Add CONTRIBUTING file 2014-01-13 15:06:26 +00:00
CQ_COMMITTERS Add Herb as a Skia committer 2014-12-12 12:37:28 -08:00
DEPS Revert of Roll libwebp to v0.4.2 (latest stable) to fix annoying build warning. (patchset #1 id:1 of https://codereview.chromium.org/807553002/) 2014-12-15 12:23:00 -08:00
Doxyfile Fix links to skia-buildbot code in preparation for deletion 2014-10-14 04:44:44 -07:00
gyp_skia allow caller to override the default output directory for gyp 2014-09-29 11:42:25 -07:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
LICENSE Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.bat Link to skiadocs site, since that is the canonical location for documentation. 2014-10-13 17:56:30 -03:00
make.py Fix reference to non-existant 'tests' target. 2014-10-13 17:51:57 -03:00
Makefile Update LSAN suppressions. 2014-08-29 07:55:35 -07:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py PRESUBMIT should only check owners for the top level include directory 2014-08-26 14:00:55 -07:00
README Point to skiadocs in our README. 2014-05-09 04:30:09 +00:00
README.chromium add root files from chrome 2013-08-13 19:11:15 +00:00
skia.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
SKP_VERSION Update SKP version 2015-01-13 04:26:37 -08:00
whitespace.txt Whitespace change to trigger rebuilds after gsutil fix 2015-01-05 06:38:26 -08:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://sites.google.com/site/skiadocs/home