1. 13 Jan, 2014 1 commit
  2. 02 Jan, 2014 3 commits
  3. 18 Dec, 2013 1 commit
  4. 13 Dec, 2013 1 commit
  5. 05 Dec, 2013 1 commit
    • halcanary@google.com's avatar
      Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache · 2c7c7ee4
      halcanary@google.com authored
      Removed SkBitmapFactory since no clients were using it.  New cache
      selection mechanism can simply pass a SkDiscardableMemory::Factory
      into the SkDiscardablePixelRef if non-default SkDiscardableMemory
      should be used.  Removed BitmapFactoryTest.
      
      SkDiscardableMemory::Factory interface.  Android will need this
      functionality in the future inside their BitmapFactory.
      
      Removed SkLazyPixelRef, since it's functionality is now subsumed into
      SkDiscardablePixelRef.  Removed LazyPixelRef test.
      
      Modified SkDiscardablePixelRef to optionally allow it to use a
      SkDiscardableMemory::Factory.  This tiny change makes it a replacement
      for SkLazyPixelRef.  This functioanlity is also necessary for moving
      Android over to SkDiscardablePixelRef from SkImageRef in a later CL.
      Added a test for this.
      
      SkDecodingImageGenerator::Install can optionally pass a factory in to
      SkDiscardablePixelRef.
      
      Removed SkImageCache, SkLruImageCache, and SkPurgeableImageCache.
      This functionality can be handled much more cleanly by
      SkDiscardableMemory.
      
      New SkDiscardableMemoryPool class to replace SkLruImageCache.  In a
      later CL, we will replace SkImageRef_GlobalPool (used by android) as
      well.  This is a concrete implementation of
      SkDiscardableMemory::Factory.  Added a test for this.
      
      modified gm/factory.cpp to remove dependnce on SkBitmapFactory +
      SkLruImageCache.  Now uses SkDecodingImageGenerator +
      SkDiscardablePixelRef + SkDiscardableMemoryPool.
      
      SkImageDecoder::Target replaces SkBitmapFactory::Target.  The
      DecodeMemoryToTarget function may disappear in the future.
      
      Moved SkLazyCachingPixelRef::DecodeProc replaces
      SkBitmapFactory::DecodeProc.  This is a short term change, since
      another CL changes SkLazyCachingPixelRef to use SkImageGenerator
      instead of DecodeProc.
      
      Modified DrawBitmapRectTest to use SkDiscardablePixelRef instead of
      SkLazyPixelRef.
      
      tools/LazyDecodeBitmap.cpp now uses SkDecodingImageGenerator +
      SkDiscardablePixelRef instead of a SkBitmapFactory.
      
      bench_pictures uses the Global SkDiscardableMemoryPool instead of a
      global gLruImageCache.
      
      R=reed@google.com, scroggo@google.com
      
      Review URL: https://codereview.chromium.org/103033002
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12515 2bbb7eff-a529-9590-31e7-b0007b416f81
      2c7c7ee4
  6. 02 Dec, 2013 1 commit
  7. 12 Nov, 2013 1 commit
  8. 04 Oct, 2013 1 commit
    • halcanary@google.com's avatar
      Make image decoding more fault resistant, less verbose. · fed30372
      halcanary@google.com authored
      This change address what happens when a jpeg is partially downloaded
      before failing.  Many browsers will render it anyway: we want Skia to
      do the same.  The JpegTest takes a perfectly cromulent jpeg file and
      only passes into the ImageDecoder the first half of the image.  We
      then verify that the image decoder returns a valid bitmap of the
      correct dimensions.
      
      We also fixed some png library errors, including issue 1691.
      
      Also, suppressed the majority of warnings from using libpng and
      libjpeg.  By default, most warnings are *not* suppressed in debug mode.
      If you have a debug binary and wish to suppress warnings, set the
      following environment variables to true
          skia_images_png_suppressDecoderWarnings
          skia_images_jpeg_suppressDecoderWarnings
      or from within a program that links to Skia:
          #if defined(SK_DEBUG)
          #include "SkRTConf.h"
          SK_CONF_SET("images.jpeg.suppressDecoderWarnings", true);
          SK_CONF_SET("images.png.suppressDecoderWarnings", true);
          #endif
      
      I tested this, before (control) and after these changes (test), on
      364,295 skps from the cluster telemetry.
      -   number of errors+warnings in control = 2804
      -   number of errors+warnings fixed = 2283
      -   number of PNG verbosity fixed =  2152
      -   number of PNG error fixed = 4
      -   number of PNG segfault fixed = 3
      -   number of PNG errors changed to warnings = 62
      -   number of JPG verbosity fixed =  26
      -   number of JPG error fixed = 91
      Not all errors and warning have been fixed.
      
      These numbers were generated using the find_bad_images_in_skps.py
      program.  This program may be useful going forward for testing
      image-decoding libraries on skp files from the cluster telemetry.
      find_bad_images_in_skps.py depends on the test_image_decoder program,
      which simply executes the SkImageDecoder::DecodeFile function and uses
      its exit status to report success or failure.
      
      BUG=skia:1649
      BUG=skia:1691
      BUG=skia:1680
      R=scroggo@google.com
      
      Review URL: https://codereview.chromium.org/24449003
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@11597 2bbb7eff-a529-9590-31e7-b0007b416f81
      fed30372
  9. 25 Jul, 2013 1 commit
  10. 22 Jul, 2013 3 commits
  11. 19 Jul, 2013 3 commits
  12. 16 Jul, 2013 1 commit
  13. 20 Jun, 2013 1 commit
  14. 17 Jun, 2013 1 commit
  15. 13 Jun, 2013 2 commits
  16. 12 Jun, 2013 1 commit
  17. 09 Jun, 2013 1 commit
  18. 08 Jun, 2013 1 commit
  19. 07 Jun, 2013 1 commit
  20. 03 Jun, 2013 1 commit
  21. 31 May, 2013 3 commits
  22. 22 May, 2013 1 commit
  23. 20 May, 2013 1 commit
  24. 15 May, 2013 6 commits
  25. 08 May, 2013 1 commit
  26. 11 Apr, 2013 1 commit