1. 25 Feb, 2014 2 commits
    • commit-bot@chromium.org's avatar
      Revert of Let DM run unit tests. (https://codereview.chromium.org/178273002/) · 79e13260
      commit-bot@chromium.org authored
      Reason for revert:
      broke tests
      
      Original issue's description:
      > Let DM run unit tests.
      >   - refactor GYPs and a few flags
      >   - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
      >   - add a few more UI features to make DM more like tests
      >
      > I believe this makes the program 'tests' obsolete.
      >
      > It should be somewhat faster to run the two sets together than running the old binaries serially:
      >   - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
      >   - together: 27s (6m21s CPU)
      >
      > Next up is to incorporate benches.  I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.
      >
      > Tested: out/Debug/tests && out/Debug/dm && echo ok
      > BUG=skia:
      >
      > Committed: http://code.google.com/p/skia/source/detail?r=13586
      
      R=bsalomon@google.com, mtklein@google.com, tfarina@chromium.org, mtklein@chromium.org
      TBR=bsalomon@google.com, mtklein@chromium.org, mtklein@google.com, tfarina@chromium.org
      NOTREECHECKS=true
      NOTRY=true
      BUG=skia:
      
      Author: reed@google.com
      
      Review URL: https://codereview.chromium.org/179403010
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@13587 2bbb7eff-a529-9590-31e7-b0007b416f81
      79e13260
    • commit-bot@chromium.org's avatar
      Let DM run unit tests. · 6bd250a2
      commit-bot@chromium.org authored
        - refactor GYPs and a few flags
        - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
        - add a few more UI features to make DM more like tests
      
      I believe this makes the program 'tests' obsolete.
      
      It should be somewhat faster to run the two sets together than running the old binaries serially:
        - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
        - together: 27s (6m21s CPU)
      
      Next up is to incorporate benches.  I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.
      
      Tested: out/Debug/tests && out/Debug/dm && echo ok
      BUG=skia:
      R=reed@google.com, bsalomon@google.com, mtklein@google.com, tfarina@chromium.org
      
      Author: mtklein@chromium.org
      
      Review URL: https://codereview.chromium.org/178273002
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@13586 2bbb7eff-a529-9590-31e7-b0007b416f81
      6bd250a2
  2. 06 Feb, 2014 1 commit
  3. 03 Feb, 2014 1 commit
    • commit-bot@chromium.org's avatar
      Initial QuadTree implementation · c22d1398
      commit-bot@chromium.org authored
      In an effort to find a faster bounding box hierarchy than the R-Tree, a QuadTree has been implemented here.
      For now, the QuadTree construction is generally faster than the R-Tree and the queries are a bit slower, so overall, SKP local tests showed QuadTree performance similar to the R-Tree performance.
      
      Tests and bench are included in this cl.
      
      At this point, I'd like to be able to commit this in order to more easily use the bots to test multiple configurations and a larger number of SKPs. The R-Tree BBH is still used by default so this change shouldn't affect chromium.
      
      BUG=skia:
      R=junov@chromium.org, junov@google.com, senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com, fmalita@google.com
      
      Author: sugoi@chromium.org
      
      Review URL: https://codereview.chromium.org/131343011
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@13282 2bbb7eff-a529-9590-31e7-b0007b416f81
      c22d1398
  4. 31 Jan, 2014 2 commits
  5. 30 Jan, 2014 1 commit
  6. 29 Jan, 2014 1 commit
  7. 27 Jan, 2014 2 commits
  8. 13 Jan, 2014 1 commit
  9. 02 Jan, 2014 1 commit
    • halcanary@google.com's avatar
      Add a release procedure to SkMallocPixelRef; remove SkDataPixelRef · 1bed687f
      halcanary@google.com authored
      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
      1bed687f
  10. 13 Dec, 2013 1 commit
  11. 10 Dec, 2013 1 commit
    • halcanary@google.com's avatar
      Implement SkAshmemDiscardableMemory · bc55eec8
      halcanary@google.com authored
      -   Implement ashmem-backed SkDiscardableMemory subclass:
          This class in only accesible via the SkDiscardableMemory::Create()
          function, which replaces the mock implementation in
          SkDiscardableMemory_none.cpp
      
      -   Added SkDiscardableMemory_ashmem.cpp to the Android port of Skia
          Removed SkDiscardableMemory_none.cpp from the Android port.
      
      -   Added DiscardableMemoryTest.
          Still needs work.
      
      -   SkDiscardablePixelRef Bugfix:
          onLockPixels() now calls SkDELETE on the SkDiscardableMemory pointer
          when it fails to unlock.
      
      -   Improved documentation inside ashmem.h
      
      BUG=
      R=scroggo@google.com
      
      Review URL: https://codereview.chromium.org/83563002
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12608 2bbb7eff-a529-9590-31e7-b0007b416f81
      bc55eec8
  12. 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
  13. 03 Dec, 2013 1 commit
    • commit-bot@chromium.org's avatar
      Refactor FourByteInterps. Add 64-bit Fast version. Add tests. · 55ca8244
      commit-bot@chromium.org authored
      Effect on benches (only _fast_ should be affected, and only on 64-bit):
      
      Desktop (64-bit)
      four_byte_interp_slow_255 NONRENDERING c          7.80       7.84      -0.04    -0.5%
      four_byte_interp_slow_256 NONRENDERING c          7.38       7.36      +0.02    +0.3%
      four_byte_interp_fast_256 NONRENDERING c          4.86       4.38      +0.48    +9.9%
      four_byte_interp_fast_255 NONRENDERING c          5.80       5.16      +0.64   +11.0%
      
      N5 (32-bit)
      four_byte_interp_slow_256 NONRENDERING c         22.22      22.66      -0.44    -2.0%
      four_byte_interp_fast_255 NONRENDERING c         22.22      22.22      +0.00    +0.0%
      four_byte_interp_fast_256 NONRENDERING c         18.81      18.81      +0.00    +0.0%
      four_byte_interp_slow_255 NONRENDERING c         22.42      22.42      +0.00    +0.0%
      
      BUG=
      R=reed@google.com
      
      Author: mtklein@google.com
      
      Review URL: https://codereview.chromium.org/100923003
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12468 2bbb7eff-a529-9590-31e7-b0007b416f81
      55ca8244
  14. 02 Dec, 2013 3 commits
  15. 28 Nov, 2013 1 commit
    • commit-bot@chromium.org's avatar
      Speed up GrResourceCache lookup by inlining GrBinHashKey comparisons · 742058f0
      commit-bot@chromium.org authored
      The GCC compilers for Android and Ubuntu do not seem to be able to
      inline the memcmp operations on GrBinHashKey data. Write the comparisons
      manually. Also shortcut GrBinHashKey::EQ to skip comparison when hashes
      do not match.
      
      Speeds up grresourcecache_find test on ARM and x86_64. Speeds up
      grresourcecache_add on x86_64.
      
      In order to test the change, moves ad hoc Gr unit tests from
      src/gr_unittest.cpp to tests/GrUnitTests to be consistent with other
      tests and enables GrUnitTests.
      
      Fixes a regression from r2863 with where re-setting GrBinHashKey data
      would not set the hash correctly. This should also improve the hash
      function itself. The regression caused many of the hash operations be
      no-ops. This is caught by the unit test.
      
      Renames the comparison functions that GrHashTable needs from EQ, LT to
      Equals, LessThan.
      
      Renames GrTBinHashKey to GrBinHashKey. The GrTBinHashKey used to
      forward comparison functions to an ENTRY template class, which would
      extract the key and call back to the GrTBinHashKey. This would save
      the user from writing one comparison function when comparison was done
      with int ENTRY::compare(). There's no real benefit in this now. Also
      this was used only for one class (GrTextureStripAtlas). The other use
      in GrResourceKey was not actually using the provided "shortcut". The
      new GrBinHashKey is not templated with the entry, rather just provides
      == and < functions. The users of GrTHashTable provide the needed
      functions now.
      
      Adds explicit documentation of functions that are actually needed
      GrTHashTable for the Key template. Adds SK_DEBUG guards according to
      the contract.
      
      R=bsalomon@google.com, mtklein@google.com
      
      Author: kkinnunen@nvidia.com
      
      Review URL: https://codereview.chromium.org/88113002
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12426 2bbb7eff-a529-9590-31e7-b0007b416f81
      742058f0
  16. 21 Nov, 2013 1 commit
  17. 20 Nov, 2013 1 commit
    • scroggo@google.com's avatar
      Changes to SkTDStackNester. · 7d8013f3
      scroggo@google.com authored
      SkTDStackNester is a class used by PdfViewer to assist in saving
      and restoring the PDF state. Clean up and test this class.
      
      Add some documentation.
      
      Add FIXME's where I have questions to resolve.
      
      Fix a bug where fNestingLevel was not initialized.
      
      Remove a commented out line of code copied over from
      SkTDStack.
      
      Rename SkTDStackNester::nests() to nestingLevel() and make it const.
      
      Remove unnecessary predeclaration and friend declaration.
      
      Remove index() (both const and non-const versions). They were
      unused, return something that may not be expected (index from
      the top, rather than from the bottom), and don't work to get any
      elements in earlier Recs once the first one is full.
      
      Report a warning if the nesting level goes above the maximum level,
      or if we attempt to bring it below zero.
      
      Prevent fNestingLevel from dropping below zero.
      
      Add kUnusedObject_SkPdfIssue, and use it where appropriate.
      
      Depends on https://codereview.chromium.org/64093009/
      
      R=mtklein@google.com
      
      Review URL: https://codereview.chromium.org/68843006
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12328 2bbb7eff-a529-9590-31e7-b0007b416f81
      7d8013f3
  18. 08 Nov, 2013 1 commit
  19. 06 Nov, 2013 1 commit
    • halcanary@google.com's avatar
      New SkRTConf macro SK_CONF_TRY_SET: no complaint on missing configuration · 1f0121af
      halcanary@google.com authored
      SK_CONF_TRY_SET() is like SK_CONF_SET(), but doesn't complain if
      confname can't be found.  This is useful if the SK_CONF_DECLARE is
      inside a source file whose linkage is dependent on the system.
      
      Internally to the SkRTConf system, SkRTConfRegistry::set() was given
      an additional parameter controling wanrings.
      
      A new RuntimeConfig unit test was introduced.  It should run silently.
      In the future, it should be expanded to cover all of the SkRTConf
      functionality.
      
      (For example, the images.jpeg.suppressDecoderWarnings variable is
      defined and used only in SkImageDecoder_libjpeg.cpp, but on MacOS, we
      use Core Graphics via SkImageDecoder_CG.cpp - SkImageDecoder_libjpeg
      is never linked in.  The same is true of the Windows Imaging Component
      on Windows.)
      
      BUG=
      R=reed@google.com
      
      Review URL: https://codereview.chromium.org/54503007
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12155 2bbb7eff-a529-9590-31e7-b0007b416f81
      1f0121af
  20. 31 Oct, 2013 1 commit
    • commit-bot@chromium.org's avatar
      Adding size parameter to read array functions · 02512881
      commit-bot@chromium.org authored
      In some cases, the allocated array into which the data will be read is using getArrayCount() to allocate itself, which should be safe, but some cases use fixed length arrays or compute the array size before reading, which could overflow if the stream is compromised.
      
      To prevent that from happening, I added a check that will verify that the number of bytes to read will not exceed the capacity of the input buffer argument passed to all the read...Array() functions.
      
      I chose to use the byte array for this initial version, so that "size" represents the same value across all read...Array() functions, but I could also use the element count, if it is preferred.
      
      Note : readPointArray and writePointArray are unused, so I could also remove them
      
      BUG=
      R=reed@google.com, mtklein@google.com, senorblanco@chromium.org
      
      Author: sugoi@chromium.org
      
      Review URL: https://codereview.chromium.org/37803002
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12058 2bbb7eff-a529-9590-31e7-b0007b416f81
      02512881
  21. 29 Oct, 2013 1 commit
    • commit-bot@chromium.org's avatar
      Allow SkLazyPixelRef to use SkScaledImageCache · 75854792
      commit-bot@chromium.org authored
      -   SkScaledImageCache:
          -   Add new FindAndLock/AddAndLock variants that work well with
              SkLazyPixelRefs (take width, height, generation_id).
          -   Add static versions of these new variants.
      
      -   SkLazyPixelRef:
          -   If NULL passed in as SkImageCache* in the constructor, it will
              now default to using the static SkScaledImageCache methods to
              cache decoded images.
          -   If (fImageCache==NULL), the default allocator can be changed
              with the setAllocator method.  If (fImageCache!=NULL), the
              SkImageCache handles allocation.
      
      -   CachedDecodingPixelRefTest to test the new functionality.
      
      BUG=
      R=scroggo@google.com, mtklein@google.com, reed@google.com
      
      Author: halcanary@google.com
      
      Review URL: https://codereview.chromium.org/37343002
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@12006 2bbb7eff-a529-9590-31e7-b0007b416f81
      75854792
  22. 24 Oct, 2013 1 commit
    • commit-bot@chromium.org's avatar
      We want to give SkPixelRef a way to signal over to GrResourceCache that it's... · 50a30431
      commit-bot@chromium.org authored
      We want to give SkPixelRef a way to signal over to GrResourceCache that it's become pointless to keep around textures based on that SkPixelRef when its pixels change, so that it can be a good citizen and free those textures.
      
      This adds an invalidation listener mechanism to SkPixelRef to let it send this message while still staying ignorant of who's listening.
      
      These messages are tricky to deliver.  The SkPixelRefs they originates from and the GrResourceCaches they ultimately end up at may be on different threads; neither class is threadsafe; their object lifetimes are totally independent; it's a many-senders-to-many-receivers relation; and neither codebase should really know about the other.
      
      So I've added a per-message-type global message bus to broadcast messages to threadsafe inboxes.  Anyone can post() a message, which will show up in all the inboxes of that type, read whenever the inbox's owner calls poll().  The implementation is _dumb_; it can be improved in several dimensions (inbox size limits, lock-free message delivery) if we find the need.
      
      I took some care to make sure not to send the invalidation message for any SkPixelRef that's sharing a generation ID with another SkPixelRef.
      
      BUG=
      R=bsalomon@google.com, scroggo@google.com, reed@google.com
      
      Author: mtklein@google.com
      
      Review URL: https://codereview.chromium.org/26734003
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@11949 2bbb7eff-a529-9590-31e7-b0007b416f81
      50a30431
  23. 23 Oct, 2013 1 commit
    • commit-bot@chromium.org's avatar
      Implement SkColorFilter as a GrGLEffect · a34995e1
      commit-bot@chromium.org authored
      Adds GrEffect::willUseInputColor() which indicates whether or not the
      input color affects the output of the effect. This is needed for
      certain Xfermodes, such as kSrc_Mode. For these modes the color filter
      will not use the input color.
      
      An effect with GrEffect::willUseInputColor() true will cause all color
      or coverage effects before it to be discarded, as their computations
      cannot affect the output. In these cases program is marked as having
      white input color.
      
      This fixes an assert when Skia is compiled in a mode that prefers
      using uniforms instead of attributes for constants. (Flags
      GR_GL_USE_NV_PATH_RENDERING or GR_GL_NO_CONSTANT_ATTRIBUTES). Using
      attributes hides the problem where the fragment shader does not need
      input color for color filters that ignore DST part of the filter. The
      assert would be hit when uniform manager tries to bind an uniform which
      has been optimized away by the shader compiler.
      
      Adds specific GrGLSLExpr4 and GrGLSLExpr1 classes. This way the GLSL
      expressions like "(v - src.a)" can remain somewhat readable in form of
      "(v - src.a())". The GrGLSLExpr<typename> template implements the
      generic functionality, GrGLSLExprX is the specialization that exposes
      the type-safe interface to this functionality.
      
      Also adds operators so that GLSL binary operators of the form
      "(float * vecX)" can be expressed in C++. Before only the equivalent
      "(vecX * float)" was possible. This reverts the common blending
      calculations to more conventional order, such as "(1-a) * c" instead of
      "c * (1-a)".
      
      Changes GrGLSLExpr1::OnesStr from 1 to 1.0 in order to preserve the
      color filter blending formula string the same (with the exception of
      variable name change).
      
      Shaders change in case of input color being needed:
       -   vec4 filteredColor;
       -   filteredColor = (((1.0 - uFilterColor.a) * output_Stage0) + uFilterColor);
       -   fsColorOut = filteredColor;
       +   vec4 output_Stage1;
       +   { // Stage 1: ModeColorFilterEffect
       +   output_Stage1 = (((1.0 - uFilterColor_Stage1.a) * output_Stage0) + uFilterColor_Stage1);
       +   }
       +   fsColorOut = output_Stage1;
      
      Shaders change in case of input color being not needed:
       -uniform vec4 uFilterColor;
       -in vec4 vColor;
       +uniform vec4 uFilterColor_Stage0;
        out vec4 fsColorOut;
        void main() {
       -   vec4 filteredColor;
       -   filteredColor = uFilterColor;
       -   fsColorOut = filteredColor;
       +   vec4 output_Stage0;
       +   { // Stage 0: ModeColorFilterEffect
       +   output_Stage0 = uFilterColor_Stage0;
       +   }
       +   fsColorOut = output_Stage0;
        }
      
      R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com
      
      Author: kkinnunen@nvidia.com
      
      Review URL: https://codereview.chromium.org/25023003
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@11912 2bbb7eff-a529-9590-31e7-b0007b416f81
      a34995e1
  24. 22 Oct, 2013 1 commit
  25. 15 Oct, 2013 1 commit
  26. 11 Oct, 2013 1 commit
    • halcanary@google.com's avatar
      GIF decode: optional error messages and fault tolerance. · 29d4e638
      halcanary@google.com authored
      Add new runtime configuration variable,
      images.gif.suppressDecoderWarnings, which suppresses warning and
      errors from the GIF library.  It defaults to "true", which is current
      behavior.
      
      (This setting can be changed by setting the environment variable
      skia_images_gif_suppressDecoderWarnings="false".)
      
      Some conditions which were errors before are now warnings:
      
      -   If the image width or height is greater than the GIF screen width or
          height (respectively) we expand the screen to hold the image.
      
      -   If the offset of the image inside the screen would place the
          image outside of the screen, we shift the image to fix this.
      
      -   If the image lacks a color table, we create a default color table.
      
      -   If the image is truncated, then the rest of the image is filled with
          the fill color.
      
      In all four cases, if images.gif.suppressDecoderWarnings is set to
      false, then a warning message is printed via SkDebugf.
      
      In the event of another kind of error, SkGIFImageDecoder::onDecode()
      will still return false.  But with this change, if
      images.gif.suppressDecoderWarnings is set to false, a description of
      the error is printed via SkDebugf.
      
      Also, added a new unit test GifTest, which tests the deconing of both
      good GIf files and corrupted files that should now work with this
      change.  This unit test is disabled on Win32, iOS, and Mac.
      
      BUG=skia:1689
      R=scroggo@google.com
      
      Review URL: https://codereview.chromium.org/26743002
      
      git-svn-id: http://skia.googlecode.com/svn/trunk@11734 2bbb7eff-a529-9590-31e7-b0007b416f81
      29d4e638
  27. 09 Oct, 2013 1 commit
  28. 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
  29. 26 Sep, 2013 2 commits
  30. 20 Sep, 2013 1 commit
  31. 19 Sep, 2013 1 commit
  32. 18 Sep, 2013 2 commits
  33. 17 Sep, 2013 1 commit