skia2/include
halcanary@google.com 1bed687f6b Add a release procedure to SkMallocPixelRef; remove SkDataPixelRef
This works in a way that is similar to SkData.

SkMallocPixelRef::NewWithProc

    Motivation: Chrome has a ETC1PixelRef which calls delete[] on the
    pixles on destruction.  There is no reason for them to almost
    duplicate our class, when we can provide them a more flexible
    class.  Example use:

      static void delete_uint8_proc(void* ptr, void*) {
        delete[] static_cast<uint8_t>(ptr);
      }
      SkPixelRef* new_delete_pixref(const SkImageInfo& info,
                                    SkColorTable* ctable) {
        size_t rb = info.minRowBytes();
        return SkMallocPixelRef::NewWithProc(
          info, rb, ctable,
          new uint8_t[info.getSafeSize(rb)],
          delete_uint8_proc, NULL);
      }

SkMallocPixelRef::NewWithData

	Motivation:  This allows up to eliminate SkDataPixelRef.  We
    modified SkImage_Raster to use MallocPixelRef rather than
    SkDataPixlRef.

Also:  Unit tests in tests/MallocPixelRefTest.

BUG=
R=reed@google.com

Review URL: https://codereview.chromium.org/106883006

git-svn-id: http://skia.googlecode.com/svn/trunk@12861 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 17:29:28 +00:00
..
animator Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
config Revert "Revert "begin to remove SkLONGLONG and wean Skia off of Sk64"" 2013-12-20 14:24:21 +00:00
core Add a release procedure to SkMallocPixelRef; remove SkDataPixelRef 2014-01-02 17:29:28 +00:00
device/xps Override drawRRect in fake SkBitmapDevices. 2013-11-12 17:10:02 +00:00
effects Remove SkBitmapAlphaThresholdShader 2013-12-18 21:58:53 +00:00
gpu Updated GLintptr and GLsizeiptr to be the appropriate types on 64 bit Windows (Take 2) 2013-12-19 19:37:10 +00:00
images Update all callsites to use info for pixelrefs 2013-12-13 19:45:58 +00:00
pathops Export SkPathOps.h functions for external use. 2013-07-09 19:43:35 +00:00
pdf Revert "[PDF] Fix font embedding restrictions." 2013-12-10 17:22:41 +00:00
pipe Fixes for piping bitmaps with encoded data. 2013-04-30 02:32:41 +00:00
ports Android now uses Harfbuzz-NG. No need to keep code specific to the old version of Harfbuzz around! 2013-12-18 19:49:27 +00:00
svg Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
text Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
utils Sanitizing source files in Housekeeper-Nightly 2013-12-31 07:01:36 +00:00
views Support MSAA4 and (non-ES) OpenGL in Android SampleApp 2013-12-10 20:37:41 +00:00
xml Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00