Commit Graph

83 Commits

Author SHA1 Message Date
emmaleer
8f4ba76742 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

Committed: https://skia.googlesource.com/skia/+/b157917507d4f7d2651f0aeb566d31603cc02240

Review URL: https://codereview.chromium.org/1260673002
2015-08-14 07:44:46 -07:00
egdaniel
b0a32cc38f Revert of SkScaledCodec class (patchset #35 id:680001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
breaking ubuntu bots

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47
>
> Committed: https://skia.googlesource.com/skia/+/b157917507d4f7d2651f0aeb566d31603cc02240

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com,emmaleer@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1285173003
2015-08-14 06:37:37 -07:00
emmaleer
b157917507 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

Review URL: https://codereview.chromium.org/1260673002
2015-08-14 05:46:09 -07:00
emmaleer
c7993d747f Revert of SkScaledCodec class (patchset #34 id:660001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
Seg-faulting:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1608/steps/dm/logs/stdio

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1294613002
2015-08-13 13:59:21 -07:00
emmaleer
d518ea7927 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Review URL: https://codereview.chromium.org/1260673002
2015-08-13 13:07:03 -07:00
emmaleer
e5aaa07c35 Revert of SkScaledCodec class (patchset #32 id:620001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
Segfaulting:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1605/steps/dm/logs/stdio

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1294593002
2015-08-13 11:44:05 -07:00
emmaleer
0944100ac8 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Review URL: https://codereview.chromium.org/1260673002
2015-08-13 11:26:57 -07:00
scroggo
1c005e4a38 Create a scanline decoder without creating a codec
Prior to this CL, if a client wanted to decode scanlines, they had to
create an SkCodec in order to get an SkScanlineDecoder. This introduces
complications if input data is not easily shared between the two
objects.

Instead, add methods to SkScanlineDecoder for creating a new one from
input data, and remove the creation functions from SkCodec.

Update DM and tests.

Review URL: https://codereview.chromium.org/1267583002
2015-08-04 09:24:45 -07:00
mtklein
99cab4e308 DM: track a direct/indirect bit for each Sink too.
The decoding tests can now veto indirect sinks like pipe-8888.

This moves Sink type detection from automatic to explicit; I can't think of any
way to automatically differentiate pipe-8888 from 8888 based only on the
output.  (They should ideally be identical, after all.)

BUG=skia:4138

Review URL: https://codereview.chromium.org/1263113002
2015-07-31 06:43:04 -07:00
scroggo
4358f13ac6 Call notifyPixelsChanged after modifying bitmap
In CodecSrc's scanline_subset test, we decode a subset of an image to a
bitmap, draw it to the canvas, and then repeat. This is fine for most
backends, but not for pipe. Pipe sees the same generation ID, so it
assumes it is the same bitmap it saw before, and just draws the
original one.

Call notifyPixelsChanged, so the bitmap will get a new generation ID,
fixing pipe.

BUG=skia:4138

Review URL: https://codereview.chromium.org/1265983004
2015-07-30 11:33:04 -07:00
mtklein
e0effd6080 Allow Srcs to veto Sinks based on their broad type.
This breaks Sinks down into three auto-detected types:
  - GPU:    anything that requests to be run in the GPU enclave
  - Vector: anything that writes to the stream instead of the bitmap
  - Raster: everything else

Some examples: gpu -> GPU, msaa16 -> GPU, 8888 -> raster, pdf -> vector,
               svg -> vector, pipe-8888 -> raster, tiles_rt-gpu -> GPU

This lets image decoding sinks veto non-raster backends explicitly,
and can let particular GMs veto GPU or non-GPU sinks as they like.

BUG=skia:

Review URL: https://codereview.chromium.org/1239953004
2015-07-29 06:37:28 -07:00
scroggo
b636b45971 Add the ability to decode a subset to SkCodec
This allows codecs that support subsets natively (i.e. WEBP) to do so.

Add a field on SkCodec::Options representing the subset.

Add a method on SkCodec to find a valid subset which approximately
matches a desired subset.

Implement subset decodes in SkWebpCodec.

Add a test in DM for decoding subsets.
Notice that we only start on even boundaries. This is due to the
way libwebp's API works. SkWEBPImageDecoder does not take this into
account, which results in visual artifacts.

FIXME: Subsets with scaling are not pixel identical, but close. (This
may be fine, though - they are not perceptually different. We'll just
need to mark another set of images in gold as valid, once
https://skbug.com/4038 is fixed, so we can tests scaled webp without
generating new images on each run.)

Review URL: https://codereview.chromium.org/1240143002
2015-07-22 07:16:20 -07:00
scroggo
9b2cdbf481 Allow creating multiple scanline decoders.
Make getScanlineDecoder return a new object each time, which is
owned by the caller, and independent from any existing scanline
decoders and the SkCodec itself.

Since the SkCodec already contains the entire state machine, and it
is used by the scanline decoders, simply create a new SkCodec which
is now owned by the scanline decoder.

Move code that cleans up after using a scanline decoder into its
destructor

One side effect is that creating the first scanline decoder requires
a duplication of the stream and re-reading the header. (With some
more complexity/changes, we could pass the state machine to the
scanline decoder and make the SkCodec recreate its own state machine
instead.) The typical client of the scanline decoder (region decoder)
uses an SkMemoryStream, so the duplication is cheap, although we
should consider the extra time to reread the header/recreate the state
machine. (If/when we use the scanline decoder for other purposes,
where the stream may not be cheaply duplicated, we should consider
passing the state machine.)

One (intended) result of this change is that a client can create a
new scanline decoder in a new thread, and decode different pieces of
the image simultaneously.

In SkPngCodec::decodePalette, use fBitDepth rather than a parameter.

Review URL: https://codereview.chromium.org/1230033004
2015-07-10 12:07:02 -07:00
scroggo
eb602a5c94 SkCodec no longer inherits from SkImageGenerator.
SkImageGenerator makes some assumptions that are not necessarily valid
for SkCodec. For example, SkCodec does not assume that it can always be
rewound.

We also have an ongoing question of what an SkCodec should report as
its default settings (i.e. the return from getInfo). It makes sense for
an SkCodec to report that its pixels are unpremultiplied, if that is
the case for the underlying data, but if a client of SkImageGenerator
uses the default settings (as many do), they will receive
unpremultiplied pixels which cannot (currently) be drawn with Skia. We
may ultimately decide to revisit SkCodec reporting an SkImageInfo, but
I have left it unchanged for now.

Import features of SkImageGenerator used by SkCodec into SkCodec.

I have left SkImageGenerator unchanged for now, but it no longer needs
Result or Options. This will require changes to Chromium.

Manually handle the lifetime of fScanlineDecoder, so SkScanlineDecoder.h
can include SkCodec.h (where Result is), and SkCodec.h does not need
to include it (to delete fScanlineDecoder).

In many places, make the following simple changes:
- Now include SkScanlineDecoder.h, which is no longer included by
  SkCodec.h
- Use the enums in SkCodec, rather than SkImageGenerator
- Stop including SkImageGenerator.h where no longer needed

Review URL: https://codereview.chromium.org/1220733013
2015-07-09 08:16:03 -07:00
mtklein
d2baa90938 Make sp- via support SkDrawables; add a GM to test it.
BUG=skia:

Review URL: https://codereview.chromium.org/1212363005
2015-07-07 09:43:28 -07:00
emmaleer
0a4c3cbfd7 Implemented onGetScanlines and onSkipScanlines for interlaced pngs
Modified DM tests to be faster when decoding interlaced pngs

BUG=skia:

Review URL: https://codereview.chromium.org/1194703002
2015-06-22 10:40:21 -07:00
msarett
7054257de9 Do not fail on images that are too small to subset decode.
Specifically (0x0) images being produced by webp scaled
decodes are causing problems.

BUG=skia:

Review URL: https://codereview.chromium.org/1192373003
2015-06-19 07:44:05 -07:00
msarett
f6db27e58e Fixing stripe test
I originally thought that there was no harm in reading or skipping
zero lines after we have already reached the end of the image.

However, once we reach the end of the image, onFinish() is
automatically called.  Performing a read or a skip after
the call to onFinish() is invalid and will cause onFinish()
to be called a second time (which is also invalid).

Seems like the code requires good behavior and the test is
wrong.

BUG=skia:

Review URL: https://codereview.chromium.org/1179213002
2015-06-12 09:34:04 -07:00
msarett
0a24297be4 DM testing for skipping and scaling
BUG=skia:

Review URL: https://codereview.chromium.org/1175993005
2015-06-11 14:27:28 -07:00
bsalomon
4ee6bd86c5 Add caps overrides to GMs
Review URL: https://codereview.chromium.org/1158963002
2015-05-27 13:23:23 -07:00
emmaleer
9700206b67 New CodeSrc* draw mode kScanline_Subset_Mode
kScanline_Subset_Mode decodes the image in subsets using a
scanline decoder.
The number of subsets can be specified by changing the constant divisor.
The number of subsets is equal to divisor*divisor.

Review URL: https://codereview.chromium.org/1157153003
2015-05-27 12:36:10 -07:00
mtklein
e44b5084d8 DM: use SkFunction to make required argument type clearer.
Previously it was hard to tell that DrawFn took an SkCanvas* and returned an Error.  Now it's clear from the type.

BUG=skia:

Review URL: https://codereview.chromium.org/1125233002
2015-05-07 10:53:34 -07:00
mtklein
6fbf4b3a7f Do we still need this DOUBLE_LOOP feature?
If so, let's do it this way so it works for all source types and doesn't need
to be chosen at compile time.

BUG=skia:

Review URL: https://codereview.chromium.org/1129693003
2015-05-06 11:35:40 -07:00
mtklein
7882924c10 DM: add Via abstract class
BUG=skia:

Review URL: https://codereview.chromium.org/1117183007
2015-05-06 07:54:07 -07:00
mtklein
d31c13d044 DM: add a Via to simulate SP pictures.
Will use this to test the other CL that adds small SkPicture implementations.

Not quite sure why patch_primitive doesn't draw the same in 8888 and sp-8888, but everything else does, so I'm not going to let that hold me back for now.

BUG=skia:

Review URL: https://codereview.chromium.org/1126613005
2015-05-05 12:59:56 -07:00
mtklein
a16e69ec6c DM: add draw_to_canvas() to trim some boilerplate for Vias.
BUG=skia:

Review URL: https://codereview.chromium.org/1123743007
2015-05-05 11:38:45 -07:00
reed
06a22f618c add deferred config to DM
BUG=skia:

Review URL: https://codereview.chromium.org/1113273006
2015-05-05 08:11:33 -07:00
msarett
9e43cabaa1 Requires a minor API change to pass the color table to getScanlineDecoder, as we do with getPixels().
BUG=skia:3722

Review URL: https://codereview.chromium.org/1061713007
2015-04-29 07:38:43 -07:00
msarett
e16b04aa60 SkJpegCodec
Enables basic decoding for jpegs

Includes rewinding

565, YUV, and Jpeg encoding are not yet implemented

BUG=skia:3257

Review URL: https://codereview.chromium.org/1076923002
2015-04-15 07:32:20 -07:00
halcanary
7e79818137 DM: add --multiPage option
Motivation: I want to switch back to single-page output by default for
direct comparison to raster backends in Gold.

I can still test the multi-page option via a command-line switch.

BUG=skia:3721

Review URL: https://codereview.chromium.org/1063873004
2015-04-14 14:06:18 -07:00
msarett
438b2adefb ***Disables swizzles to 565.
We may want to enable swizzles to 565
for images that are encoded in a format
similar to 565, however, we do not want
to take images that decode naturally to
kN32 and then convert them to 565.

***Enable swizzles to kIndex_8.  For images
encoded in a color table format, we suggest
that they be decoded to kIndex_8.  When we
decode, we only allow conversion to kIndex_8
if it matches the suggested color type (except
wbmp which seems good as is).

***Modify dm to test images that decode to
kIndex_8.

BUG=skia:3257
BUG=skia:3440

Review URL: https://codereview.chromium.org/1055743003
2015-04-09 12:43:10 -07:00
mtklein
b7e8d69fc2 Add a Via to DM that records into two pictures and draws using the second.
I'm going to start hacking on SkCanvas a bit to allow a fast reset method,
and I want to have some testing checking me.

BUG=skia:

Review URL: https://codereview.chromium.org/1062043004
2015-04-07 08:30:32 -07:00
djsollen
2ab9000b3f Prevent DM crash in the PDF sink when src width/height are zero.
Review URL: https://codereview.chromium.org/1061493002
2015-04-03 06:38:31 -07:00
joshualitt
7c3a2f834e BitmapTextBatch and BitmapTextBlob
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984

Review URL: https://codereview.chromium.org/1011403004
2015-03-31 13:32:05 -07:00
joshualitt
c03391e792 Revert of BitmapTextBatch and BitmapTextBlob (patchset #18 id:360001 of https://codereview.chromium.org/1011403004/)
Reason for revert:
Breaks a unit test on mac

Original issue's description:
> BitmapTextBatch and BitmapTextBlob
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984

TBR=fmalita@chromium.org,reed@google.com,jvanverth@google.com,robertphillips@google.com,bsalomon@google.com,jvanverth@chromium.org,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1050633002
2015-03-31 11:33:08 -07:00
joshualitt
eed1dae049 BitmapTextBatch and BitmapTextBlob
BUG=skia:

Review URL: https://codereview.chromium.org/1011403004
2015-03-31 11:04:53 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
scroggo
9c59ebc0db Test scanline decoding in DM.
BUG=skia:3475

Review URL: https://codereview.chromium.org/999173010
2015-03-25 13:48:49 -07:00
mtklein
b3e5e4d314 Lazy SKP image decoding in DM.
@sugoi:
Early out to avoid some segfaults in SkImageDecoder_libjpeg.cpp.
I am just flailing here... things seem to work, but I have no idea why.
This prints out a lot:
    libjpeg error 85 <End Of Image> from output_raw_data [0 0]

@halcanary:
I'm skipping on ImageSrc for now.  Leon's refactoring that quite a lot.

This causes minor diffs for the GPU backend, given that we're now
going through the YUV path.  It also reduced peak RAM usage on
my desktop from 1.26GB to 1.08GB.

BUG=skia:

Review URL: https://codereview.chromium.org/1010983004
2015-03-25 13:13:43 -07:00
scroggo
478652e918 Add copyright headers DM.
Review URL: https://codereview.chromium.org/1037713003
2015-03-25 07:11:02 -07:00
msarett
9bde918754 Enabling ico decoding with use of png and bmp decoders
BUG=skia:3257

NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1011343003
2015-03-25 05:27:48 -07:00
tomhudson
7aa846c683 Revert of Enabling ico decoding with use of png and bmp decoders (patchset #10 id:280001 of https://codereview.chromium.org/1011343003/)
Reason for revert:
Reverting on suspicion of massive bot failures - possible command line too long?

Original issue's description:
> Enabling ico decoding with use of png and bmp decoders
>
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/15bfd075d38e4422a477e22940d06a137f66cc97

TBR=scroggo@google.com,reed@google.com,djsollen@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3257

Review URL: https://codereview.chromium.org/1022843005
2015-03-24 13:47:41 -07:00
msarett
15bfd075d3 Enabling ico decoding with use of png and bmp decoders
BUG=skia:3257

Review URL: https://codereview.chromium.org/1011343003
2015-03-24 12:24:27 -07:00
reed
3ef71e343b guarded change to SkImageGenerator to make getInfo() const
BUG=skia:

Review URL: https://codereview.chromium.org/1017293002
2015-03-19 08:31:14 -07:00
scroggo
9b77ddde08 Run CodecSrc DM.
Rather than making SkCodec an option instead of SkImageDecoder,
create a separate CodecSrc. This allows us to compare the two.

For both CodecSrc and ImageSrc, do not decode to a gpu backend.

BUG=skia:3475

Review URL: https://codereview.chromium.org/978823002
2015-03-19 06:03:39 -07:00
msarett
741143878b Revert "Revert of fix for invalid for loop syntax broke build (patchset #1 id:1 of https://codereview.chromium.org/1007373003/)"
This reverts commit d18475854c.

Revert "Revert "Implementation of image decoding for bmp files, in accordance with the new API.""

This reverts commit dfdec78a5d.

BUG=skia:

TBR=

Review URL: https://codereview.chromium.org/1016443003
2015-03-16 11:55:18 -07:00
msarett
dfdec78a5d Revert "Implementation of image decoding for bmp files, in accordance with the new API."
This reverts commit 3675874468.

BUG=skia:
NOTREECHECKS=true
NOTRY=true
TBR=

Review URL: https://codereview.chromium.org/1012873002
2015-03-16 11:07:02 -07:00
mtklein
ffa901aa7e DM: allow SKPs to be smaller than 1000x1000
This sniffs the .skp dimensions and intersects them with our 1000x1000 viewport.

This fixes things like desk_carsvg.skp, which is only 902 pixels tall.  In 565 now,
the remaining 98 pixels draw as black, which looks funny and is confusing to triage.

No apparent affect on DM memory usage.  (We're about to map the file anyway.)

BUG=skia:

Review URL: https://codereview.chromium.org/986103002
2015-03-16 10:38:07 -07:00
msarett
3675874468 Implementation of image decoding for bmp files, in accordance with the new API.
Currently decodes to opaque and unpremul.

Tested on local test suite.

BUG=skia:3257

Review URL: https://codereview.chromium.org/947283002
2015-03-16 08:27:53 -07:00
scroggo
56e25ddf6e DM: Use the new non-fatal errors for invalid color conversions.
Also allow incomplete to be considered successful.

Do not attempt to draw transparent images on 565.

BUG=skia:3475

Review URL: https://codereview.chromium.org/978413002
2015-03-05 11:46:40 -08:00