1. 20 Sep, 2013 1 commit
    • Leon Scroggins III's avatar
      Build fix. · 2c7111b0
      Leon Scroggins III authored
      Do not build bench which depends on more recent changes to
      bench not included by android yet.
      
      Change-Id: Icddcd60be3cb5f577378b0a82c8d0084fdebc498
      2c7111b0
  2. 19 Sep, 2013 8 commits
    • Leon Scroggins III's avatar
    • Leon Scroggins III's avatar
      Add an option on SkImageDecoder to skip writing 0s. · 34835907
      Leon Scroggins III authored
      Only implemented for PNG.
      
      Add a getter and setter, and sets the default to false in the
      constructor. Also copies the setting in copyFieldsToOther.
      
      Fix an indpendent bug where fDitherImage was not being copied in
      copyFieldsToOther.
      
      In SkScaledBitmapSampler::begin, consolidate the settings passed in
      by passing a const reference to the decoder. The decoder can be
      referenced for its settings of dither, unpremultiplied, and now
      skipping writing zeroes. Update callers to use the new API. In png
      decoder, rather than passing around a pointer to an initial
      read of getDitherImage, and potentially changing it, look at the
      field on the decoder itself, and modify it directly. This is a
      change in behavior - now if that same decoder is used to decode
      a different image, the dither setting has changed. I think this is
      okay because A) the typical use case is to use a new decoder for
      each decode, B) we do not make any promises that a decode does not
      change the decoder and C) it makes the code in SkScaledBitmapSampler
      much cleaner.
      
      In SkScaledBitmapScampler, add new row procs for skipping zeroes. Now
      that choosing the row proc has five dimensions (src config, dst config,
      dither, skip writing zeroes, unpremultiplied), use a new method: each
      src/dst combination has a function for choosing the right proc depending
      on the decoder.
      
      SkScaledBitmapScampler::RowProc is now public for convenience.
      
      Remove Sample_Gray_D8888_Unpremul, which is effectively no different
      from Sample_Gray_D8888.
      
      In cases where unpremultiplied was trivial, such as 565 and when
      sampling from gray, decoding may now succeed.
      
      Add a benchmark (currently disabled) for comparing the speed of skipping
      writing zeroes versus not skipping. For this particular image, which is
      mostly transparent pixels, normal decoding took about 3.6 milliseconds,
      while skipping zeroes in the decode took only about 2.5 milliseconds
      (this is on a Nexus 4). Presumably it would be slower on an image
      with a small amount of transparency, but there will be no slowdown
      for an image which reports that it has no transparency.
      
      In SkImageRef_ashmem, always skip writing zeroes, since ashmem
      memory is guaranteed to be initialized to 0.
      
      Add a flag to skip writing zeroes in skimage.
      
      Add a regression test for choosing the rowproc to ensure I did not
      change any behavior accidentally.
      
      BUG:10016979
      Change-Id: I5986ae750b85a9c9d8e3cafeebe904910247de3b
      34835907
    • Derek Sollenberger's avatar
    • Derek Sollenberger's avatar
    • Derek Sollenberger's avatar
    • Derek Sollenberger's avatar
      Update Skia defines to be more in line with those used in chromium m30 · f4ad2a30
      Derek Sollenberger authored
      bug:10221459
      Change-Id: I89a5e7ee3966a3f548471d5b64e3b969b3a3e2d8
      f4ad2a30
    • Derek Sollenberger's avatar
      Merge skia changes from the skia chrome/m30_1599 branch. · 3d128a58
      Derek Sollenberger authored
      This captures revisions r11183 to r11196 (inclusive). However, some
      Canvas changes have already been cherry-picked so they will not show
      up in this CL.
      
      bug: 10285384
      
      Change-Id: I2b22937d68f18b40bb3914bd94142ed21f8ae4c0
      3d128a58
    • Derek Sollenberger's avatar
      Update Skia to use sftnly for character subsetting support for PDF · 29c49123
      Derek Sollenberger authored
      bug: 10314402
      Change-Id: I31ed88fd072f0dbb23f20f383d410d55f7bcd202
      29c49123
  3. 18 Sep, 2013 4 commits
  4. 16 Sep, 2013 3 commits
  5. 11 Sep, 2013 1 commit
  6. 10 Sep, 2013 1 commit
  7. 09 Sep, 2013 1 commit
    • Victoria Lease's avatar
      Scale bitmap glyphs to requested size (FreeType only) · 924ac31c
      Victoria Lease authored
      In addition to selecting a bitmap strike appropriate for the
      requested font size, we must also scale the chosen bitmap strike
      to match the requested font size, as it will almost always not be
      the actual size requested. This commit does so, and adjusts per-glyph
      metrics accordingly.
      
      Bug: 10260891
      Change-Id: Ib9ebed250df32dec97e72419f7b612b996443516
      924ac31c
  8. 06 Sep, 2013 1 commit
  9. 05 Sep, 2013 1 commit
  10. 04 Sep, 2013 3 commits
  11. 29 Aug, 2013 2 commits
  12. 28 Aug, 2013 2 commits
    • Leon Scroggins III's avatar
      Handle SkStream::rewind properly. · dcfe5370
      Leon Scroggins III authored
      cherry-pick of https://code.google.com/p/skia/source/detail?r=10977
      
      include/core/SkStream.h:
      Update documentation to state that rewinding a stream at the beginning
      should return true. This is important because our decoders fail if
      rewind returns false, assuming that the stream is not at the beginning.
      
      src/images/SkImageDecoder_libpng.cpp:
      If rewind fails, call png_error.
      
      src/images/SkImageDecoder_libwebp.cpp:
      If rewind fails, report an error and return false.
      
      src/images/SkImageRef.cpp:
      If rewind fails report an error and return false.
      FIXME: Need to handle flattening properly. Should I perhaps move
      writeStream into SkOrderedWriteBuffer?
      
      src/images/SkJpegUtility.cpp:
      Report a jpeg error on failure to rewind.
      
      BUG:8432093
      Change-Id: Ie339cda0a9d31bf0abafc38f9c2c77726f23c6a6
      dcfe5370
    • Leon Scroggins III's avatar
  13. 27 Aug, 2013 2 commits
  14. 26 Aug, 2013 1 commit
  15. 21 Aug, 2013 1 commit
  16. 20 Aug, 2013 1 commit
  17. 14 Aug, 2013 1 commit
  18. 13 Aug, 2013 2 commits
    • Mike Klein's avatar
      Build Skia with Thumb2 instead of ARM. · 24330191
      Mike Klein authored
      This change cuts libskia.so from 2.3MB to 1.5MB with no loss in
      performance.
      
      We've recently cleared away the issues that were preventing Skia from
      building with Thumb2, and our performance tests showed it was at worst
      neutral on a Nexus S, and slightly positive on a Nexus 4.  Skia has been
      building and testing with Thumb2 for two uneventful weeks now, and Clank
      has apparently been doing it for forever.
      
      bug: 9914906
      Change-Id: I4f9ed568214b31b148516db60f8f6c7a8e349389
      24330191
    • Derek Sollenberger's avatar
      Snapshot from http://skia.googlecode.com/svn/trunk@10680 · e27eefc4
      Derek Sollenberger authored
      Change-Id: I846e489575859eff43302c698606953c58420671
      e27eefc4
  19. 08 Aug, 2013 2 commits
    • Torne (Richard Coles)'s avatar
      Add the debug canvas to the built files. · f8eb2b45
      Torne (Richard Coles) authored
      Chromium expects to be able to use the skia debug canvas; add it to the
      list of files built along with its dependencies.
      
      Change-Id: I43e890f0440a9b4b77ac025f5f0461fad801490f
      f8eb2b45
    • Torne (Richard Coles)'s avatar
      Update skia compiler defines. · 3e461ec1
      Torne (Richard Coles) authored
      Add GR_GL_PER_GL_FUNC_CALLBACK=1 as Chromium requires it, and move
      GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1 into the headers instead of the
      command line so that it's visible by code including skia headers.
      
      Change-Id: Ia6ccb487e60359322e35648e53a7f5a659ddcd41
      3e461ec1
  20. 07 Aug, 2013 1 commit
    • Victoria Lease's avatar
      provide metrics for bitmap fonts · 61d82695
      Victoria Lease authored
      This also refactors how metrics are generated for outline fonts, in
      an attempt to keep the metrics code as common/universal as possible.
      
      Bug: 9577689
      Change-Id: I845a3af111314d8983e5de919343aeceb7609489
      61d82695
  21. 06 Aug, 2013 1 commit
    • Victoria Lease's avatar
      enable FT_LOAD_COLOR and FT_PIXEL_MODE_BGRA · 77f2fa8f
      Victoria Lease authored
      This commit provides colour bitmap font support via FreeType's new
      FT_LOAD_COLOR and FT_PIXEL_MODE_BGRA flags. Some minor bitmap format
      conversion was needed, as SkMask does not have a BGRA format.
      
      Bug: 9577689
      Change-Id: Ifb0a031c5ab52543b1e53fa778945d20953d1a33
      77f2fa8f