Commit Graph

2921 Commits

Author SHA1 Message Date
reed
7b81994d95 Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away"
Fixed assert in test that was calling GrRecordReplaceDraw(). That function now uses
drawBitmap, so updated the test to check for that (instead of drawSprite).

This reverts commit 21b7663470.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1410343011
2015-11-03 07:12:16 -08:00
aleksandar.stojiljkovic
7600183ba7 SkScan_Antihair: assert in debug and potentialy lost last pixels
alpha: (uint8_t) 256 is clamped to 255 before static cast to
uint8_t in SkToU8.

BUG=4406

Review URL: https://codereview.chromium.org/1424253002
2015-11-02 13:28:51 -08:00
caryclark
952ebfe228 path ops: fix fuzz-found divide by zero
TBR=reed@google.com
BUG=542391

Review URL: https://codereview.chromium.org/1427913005
2015-11-02 07:32:58 -08:00
egdaniel
574a4c153d Move shader compiling to ProgramBuilder and various ShaderBuilder cleanups.
An additional positive of this CL is that GrGLShaderBuilder is now GL independent besides GrGLProgramBuilder

BUG=skia:

Review URL: https://codereview.chromium.org/1431433003
2015-11-02 06:22:44 -08:00
caryclark
ef784fb7f5 More conic-specific tests revealed a few conic-specific bugs. Because javascript / canvas make visualizing conics tricky, new native tools are required.
The utility SubsetPath removes parts of a potentially very large path to isolate a minimal test case. SubsetPath is very useful for debugging path ops, but is not path ops specific.

PathOpsBuilderConicTest compares the output of the Path Ops Builder, sequential calls to Simplify, and SkRegions for some number of rotated ovals.

Some tests caused path ops to hang. It was caught adding a loop of curves because the head was not found by the tail. Even though the root cause has been fixed, SkSegment::addCurveTo callers now abort the path op if the same curve was added twice.

The subdivided conic weight was been computed anew. Fortunately, it's a simpler computation that the one it replaces.

Some Simplify() subroutines returned false to signal that the results needed assembling. Change these to abort the current operation instead.

Coincident curve intersection triggered two small bugs; one where no perpendicular could be found for coincident curves, and one where no coincident curves remain after looping.

The SixtyOvals test can be run through multiple processes instead of multiple threads. This strategy allows a 48 core machine to saturate all cores at 100%.

The DEBUG_VISUALIZE_CONICS code in PathOpsConicIntersectionTest acknowleges that it is easier to visualize conics with Skia than with script and html canvas. This test also verifies that path ops subdivision matches geometry chopping.

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1405383004
2015-10-30 12:03:06 -07:00
halcanary
337797580d Make SkTextBlob::RunIterator public.
Motivation: This will be easier than adding a friend every time I want
to create a one-off SkCanvas subclass or SkRemote::Encoder subclass.

See also: SkPath::Iter.

Review URL: https://codereview.chromium.org/1411723005
2015-10-27 14:01:05 -07:00
scroggo
27c172885f Update CodexTest for 565
All our codecs now support 565, so no need to have a boolean to check
it.

Review URL: https://codereview.chromium.org/1414553006
2015-10-27 08:14:46 -07:00
mtklein
40732b34a1 SkRecord refactor: fill bounds array instead of BBH directly
This should be a strict refactor, just pulling out the bounds array.
(It's the rescued nice parts of a dead-end CL targeting skia:4492.)

BUG=skia:

Review URL: https://codereview.chromium.org/1424553002
2015-10-24 07:45:47 -07:00
scroggo
ef27d89b07 Use SkSwizzler to convert from CMYK
Move convert_CMYK_to_RGBA into two functions in SkSwizzler: one for 565
and one for 8888.

For simplicity, when converting to 8888, we no longer convert in place.

BUG=skia:4476

Committed: https://skia.googlesource.com/skia/+/450ee8f26d39f975cf6af37a27de658ae5a9fa10

Review URL: https://codereview.chromium.org/1411083009
2015-10-23 09:29:22 -07:00
scroggo
b7f1251775 Revert of Use SkSwizzler to convert from CMYK (patchset #4 id:60001 of https://codereview.chromium.org/1411083009/ )
Reason for revert:
Breaking ASAN. See http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/2879

Original issue's description:
> Use SkSwizzler to convert from CMYK
>
> Move convert_CMYK_to_RGBA into two functions in SkSwizzler: one for 565
> and one for 8888.
>
> For simplicity, when converting to 8888, we no longer convert in place.
>
> BUG=skia:4476
>
> Committed: https://skia.googlesource.com/skia/+/450ee8f26d39f975cf6af37a27de658ae5a9fa10

TBR=msarett@google.com,scroggo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4476

Review URL: https://codereview.chromium.org/1411193006
2015-10-23 08:39:58 -07:00
scroggo
450ee8f26d Use SkSwizzler to convert from CMYK
Move convert_CMYK_to_RGBA into two functions in SkSwizzler: one for 565
and one for 8888.

For simplicity, when converting to 8888, we no longer convert in place.

BUG=skia:4476

Review URL: https://codereview.chromium.org/1411083009
2015-10-23 08:01:06 -07:00
reed
c9b5f8b152 tunnel down texture-size-constraint to imagefilters
BUG=skia:

Review URL: https://codereview.chromium.org/1421493003
2015-10-22 13:20:20 -07:00
caryclark
ed0935a28a Reland of path ops: fix conic weight and partial coincidence (patchset #1 id:1 of https://codereview.chromium.org/1408923003/ )
Reason for revert:
suppressions have landed in chrome

Original issue's description:
> Revert of path ops: fix conic weight and partial coincidence (patchset #5 id:80001 of https://codereview.chromium.org/1413763002/ )
>
> Reason for revert:
> path ops change breaks svg clipping layout tests -- conic is now more accurate, changing edge of circle in clip
>
> These need to be rebaselined
>
> svg/clip-path/clip-path-child-clipped.svg
> svg/clip-path/clip-path-nonzero.svg
> svg/clip-path/clip-path-evenodd-nonzero.svg
> svg/clip-path/clip-path-nonzero-evenodd.svg
>
> Original issue's description:
> > The remaining 1m skp bugs are asserts that can be harmlessly
> > suppressed and bugs around conics.
> >
> > The conic calculation for a subdivided w was just wrong.
> >
> > Also added debugging to template intersection to initialize
> > reused structures and dump additional data.
> >
> > TBR=reed@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/ef33b1e739b23a1201100ff17a572da85b03d9af
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/f428df1be3e96d3f8970d0f7f415b862f7da5404

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1407003016
2015-10-22 07:23:52 -07:00
msarett
3d9d7a7213 Create an SkAndroidCodec API separate from SkCodec
We will implement this API using SkCodecs.

SkAndroidCodecs will be used to implement the
BitmapRegionDecoder Java API (and possibly
BitmapFactory).

BUG=skia:

Review URL: https://codereview.chromium.org/1406223002
2015-10-21 10:27:10 -07:00
bsalomon
02141734f2 Stop creating static GrProcessor instances
R=joshualitt@google.com

BUG=skia:4483

Review URL: https://codereview.chromium.org/1414733007
2015-10-21 06:57:31 -07:00
caryclark
f428df1be3 Revert of path ops: fix conic weight and partial coincidence (patchset #5 id:80001 of https://codereview.chromium.org/1413763002/ )
Reason for revert:
path ops change breaks svg clipping layout tests -- conic is now more accurate, changing edge of circle in clip

These need to be rebaselined

svg/clip-path/clip-path-child-clipped.svg
svg/clip-path/clip-path-nonzero.svg
svg/clip-path/clip-path-evenodd-nonzero.svg
svg/clip-path/clip-path-nonzero-evenodd.svg

Original issue's description:
> The remaining 1m skp bugs are asserts that can be harmlessly
> suppressed and bugs around conics.
>
> The conic calculation for a subdivided w was just wrong.
>
> Also added debugging to template intersection to initialize
> reused structures and dump additional data.
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/ef33b1e739b23a1201100ff17a572da85b03d9af

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1408923003
2015-10-21 04:02:51 -07:00
caryclark
ef33b1e739 The remaining 1m skp bugs are asserts that can be harmlessly
suppressed and bugs around conics.

The conic calculation for a subdivided w was just wrong.

Also added debugging to template intersection to initialize
reused structures and dump additional data.

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1413763002
2015-10-20 13:42:25 -07:00
mtklein
a1bde7d2e1 Remove SkThread::setProcessorAffinity()
It's only used by a couple unit tests.  We have other ways of getting
the same quality testing of our ref-count code now (e.g. TSAN).

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1408213005
2015-10-20 11:05:06 -07:00
benjaminwagner
7d974f5e4f Modifications to get 'blaze build -c opt //third_party/skia/HEAD/...' to work.
BUG=skia:

Review URL: https://codereview.chromium.org/1413973002
2015-10-19 13:55:55 -07:00
robertphillips
423f6461e9 Add SkTTopoSort
BUG=skia:4094

Review URL: https://codereview.chromium.org/1414503003
2015-10-19 12:15:55 -07:00
msarett
80803ff615 Fix SkSwizzler bug
Now, that we are subsetting, fX0 is not necessarily less than
fSrcWidth (since fSrcWidth is really the subset width).

Ex: We may want a 10 pixel subset starting twenty pixels from the
left edge.  In that case, fX0=20 and fSrcWidth=10.

Let's rename the width as fSubsetWidth to avoid confusion
and remove the check.

BUG=skia:

Review URL: https://codereview.chromium.org/1407603003
2015-10-16 10:54:12 -07:00
caryclark
26ad22ab61 Enabling clip stack flattening exercises path ops.
Iterating through the 903K skps that represent the
imagable 1M top web pages triggers a number of
bugs, some of which are addressed here.

Some web pages trigger intersecting cubic
representations of arc with their conic
counterparts. This exposed a flaw in coincident
detection that caused an infinite loop. The loop
alternatively extended the coincident section and,
determining the that the bounds of the curve pairs
did not overlap, deleted the extension.

Track the number of times the coincident detection
is called, and if it exceeds an empirically found
limit, assume that the curves are coincident and
force it to be so.

The loop count limit can be determined by enabling
DEBUG_T_SECT_LOOP_COUNT and running all tests. The
largest count is reported on completion.

Another class of bugs was caused by concident
detection duplicating nearly identical points that
had been merged earlier. To track these bugs, the
'handle coincidence' code was duplicated as a
const debug variety that reported if one of a
dozen or so irregularities are present; then it is
easier to see when a block of code that fixes one
irregularity regresses another.

Creating the debug const code version exposed some
non-debug code that could be const, and some that
was experimental and could be removed. Set
DEBUG_COINCIDENCE to track coincidence health and
handling.

For running on Chrome, DEBUG_VERIFY checks the
result of pathops against the same operation
using SkRegion to verify that the results are
nearly the same.

When visualizing the pathops work using
tools/pathops_visualizer.htm, set
DEBUG_DUMP_ALIGNMENT to see the curves after
they've been aligned for coincidence.

Other bugs fixed include detecting when a
section of a pair of curves have devolved into
lines and are coincident.

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1394503003
2015-10-16 09:03:38 -07:00
mtklein
c8d1dd48c0 SkTHash: hash from fnptr to functor type
Passing &SkGoodHash to SkTHashMap and SkTHashSet doesn't guarantee that it's actually instantiated.  Using a functor does.

BUG=skia:

Review URL: https://codereview.chromium.org/1405053002
2015-10-15 12:23:02 -07:00
fmalita
0b01da7bca Fix TextBlobTest valgrind error
When converting text to glyph IDs, the paint needs to reflect the actual
text encoding.

R=bungeman@google.com,herb@google.com

Review URL: https://codereview.chromium.org/1404153002
2015-10-14 08:11:40 -07:00
fmalita
9ae8fe1c60 [SkTextBlob] Remove incorrect builder assert
At the end of TightRunBounds, glyphPosX cannot exceed the start of the
next run.  But glyphPosY is running ahead of glyphPosX (for
kFull_Positioning) => the glyphPosY assert is incorrect.

Since the two pointers advance in lock-step, there isn't much value in
the glyphPosY assert anyway - we might as well remove it.

BUG=chromium:542643
R=reed@google.com,bungeman@google.com

Review URL: https://codereview.chromium.org/1405463004
2015-10-13 08:59:23 -07:00
halcanary
66a82f3872 SkPDF: fall back on paths for unembeddable fonts.
Add GM, SkPDFFont::CanEmbedTypeface

BUG=skia:3866

Review URL: https://codereview.chromium.org/1401763002
2015-10-12 13:05:04 -07:00
reed
88d064d0e4 add applyFilter() to SkImage
Result:
- clients can get a filtered version of an image without having to setup a temp drawing environment
- for some cases, the process is more efficient even than (deprecated) drawSprite, since there is no need to draw/copy the result

Impl:
- made Proxy virtual so we don't need to have an existing device to use it

This, in conjunction with LocalMatrixImageFilter, should allow us to simplify and optimize ApplyImageFilter() in cc/output/gl_renderer.cc

BUG=skia:

Review URL: https://codereview.chromium.org/1390913005
2015-10-12 11:30:02 -07:00
reed
f028003cf4 change more effects to only expose factories
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1395403002
2015-10-12 11:10:10 -07:00
bsalomon
afa95e270c Remove image usage type enum. Use GrTextureParams instead.
BUG=skia:

Review URL: https://codereview.chromium.org/1404433002
2015-10-12 10:39:46 -07:00
bsalomon
f276ac5c16 Move functions from SkGr to SkGrPriv.h
Review URL: https://codereview.chromium.org/1397123002
2015-10-09 13:36:42 -07:00
msarett
e6dd004c1b Fill incomplete images in SkCodec parent class
Rather than implementing some sort of "fill" in every
SkCodec subclass for incomplete images, let's make the
parent class handle this situation.

This includes an API change to SkCodec.h

SkCodec::getScanlines() now returns the number of lines it
read successfully, rather than an SkCodec::Result enum.
getScanlines() most often fails on an incomplete input, in
which case it is useful to know how many lines were
successfully decoded - this provides more information than
kIncomplete vs kSuccess.  We do lose information when the
API is used improperly, as we are no longer able to return
kInvalidParameter or kScanlineNotStarted.

Known Issues:
Does not work for incomplete fFrameIsSubset gifs.
Does not work for incomplete icos.

BUG=skia:

Review URL: https://codereview.chromium.org/1332053002
2015-10-09 11:07:34 -07:00
scroggo
2c3b218f74 Focus SkScaledCodec on BitmapRegionDecoder
The primary goal of SkScaledCodec is to replace the current
implementation of BitmapRegionDecoder, which depends on modified
versions of libjpeg and libpng, with an implementation that uses
standard versions of the libaries. Since BitmapRegionDecoder only
supports PNG, WEBP and JPEG, limit SkScaledCodec to those classes.
We will focus on those three until we complete this primary goal.
Then we can continue to make SkScaledCodec work for other formats.

Fix some bugs in SkScaledCodec::NewFromStream:
- Handle a NULL input stream properly
- Ensure that the input stream is deleted as expected on bad data

Add tests for these error cases.

BUG=skia:4428

Review URL: https://codereview.chromium.org/1389053002
2015-10-09 08:40:59 -07:00
reed
5ea95df02d Revert "Revert of factories should return baseclass, allowing the impl to specialize (patchset #4 id:60001 of https://codereview.chromium.org/1390523005/ )"
This reverts commit 95376a0dde.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1389083002
2015-10-06 14:05:32 -07:00
schenney
95376a0dde Revert of factories should return baseclass, allowing the impl to specialize (patchset #4 id:60001 of https://codereview.chromium.org/1390523005/ )
Reason for revert:
Breaks Chrome with this link error: ../../third_party/skia/include/effects/SkMorphologyImageFilter.h:75: error: undefined reference to 'SkMorphologyImageFilter::SkMorphologyImageFilter(int, int, SkImageFilter*, SkImageFilter::CropRect const*)'
../../third_party/skia/include/effects/SkMorphologyImageFilter.h:104: error: undefined reference to 'SkMorphologyImageFilter::SkMorphologyImageFilter(int, int, SkImageFilter*, SkImageFilter::CropRect const*)'

Presumably due to code in third_party/WebKit/Source/platform/graphics/filters/FEMorphology.cpp that contains:
#include "SkMorphologyImageFilter.h"

...

    if (m_type == FEMORPHOLOGY_OPERATOR_DILATE)
        return adoptRef(SkDilateImageFilter::Create(radiusX, radiusY, input.get(), &rect));
    return adoptRef(SkErodeImageFilter::Create(radiusX, radiusY, input.get(), &rect));

Original issue's description:
> factories should return baseclass, allowing the impl to specialize
>
> waiting on https://codereview.chromium.org/1386163002/# to land
>
> BUG=skia:4424
>
> Committed: https://skia.googlesource.com/skia/+/80a6dcaa1b757826ed7414f64b035d512d9ccbf8

TBR=senorblanco@google.com,robertphillips@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4424

Review URL: https://codereview.chromium.org/1389063002
2015-10-06 12:59:55 -07:00
reed
80a6dcaa1b factories should return baseclass, allowing the impl to specialize
waiting on https://codereview.chromium.org/1386163002/# to land

BUG=skia:4424

Review URL: https://codereview.chromium.org/1390523005
2015-10-06 11:12:23 -07:00
bsalomon
4a33952961 Bye bye processor data manager.
Review URL: https://codereview.chromium.org/1388113002
2015-10-06 08:40:51 -07:00
msarett
cc7f305c69 SkScaledCodec should implement onRewind()
This is a bug fix.  I'm also adding a test.

BUG=skia:

Review URL: https://codereview.chromium.org/1385703002
2015-10-05 14:20:27 -07:00
bsalomon
473addf176 Remove separate cache for clip mask textures
Review URL: https://codereview.chromium.org/1377943003
2015-10-02 07:49:06 -07:00
bungeman
77a53de20d Base SkAutoTUnref on skstd::unique_ptr.
To further consolidate the various unique owning classes, this bases
SkAutoTUnref on skstd::unique_ptr. Users are updated because of two
breaking changes, swap now takes a reference and reset no longer
returns its argument.

Review URL: https://codereview.chromium.org/1370803002
2015-10-01 12:28:49 -07:00
joshualitt
4d06ae620d Enable image is opaque test seems to pass now
BUG=skia:2857

Review URL: https://codereview.chromium.org/1375293003
2015-10-01 09:49:25 -07:00
halcanary
7a14b310d6 SkPDF: Implement drawImage*() properly
drawImage calls now properly embeds the original jpeg.

NOTE: drawBitmap*() calls no longer embed JPEG files when
possible (this is in advance of eliminating bitmaps backed
by encoded data).  Chromium has already moved from
drawBitmap to drawImage.

Comparisons:

control:
    total PDF drawImage/drawBitmap calls: 8010
    total PDF jpeg images: 0
    total PDF regular images: 3581

experiament:
    total PDF drawImage/drawBitmap calls: 8014
    total PDF jpeg images: 271
    total PDF regular images: 3311
    total PDF regular images: 3582 (271 + 3311)

When comparing rendered output there were perceptual
differences in the following four GMs: colorcube, emboss,
colormatrix, and tablecolorfilter.  All of these differences
were improvements (that is, closer to the 8888 rendering)
due fixing a bug with colorfilters and forgetting to call
notifyPixelsChanged.

No SKPs had perceptual differences.

Total PDF size dropped from 133964 kB to 126276 kB, a 5.7%
improvement (mostly due to restoring use of JPG images in
SKPs).

BUG=skia:4370

Review URL: https://codereview.chromium.org/1372783003
2015-10-01 07:28:13 -07:00
scroggo
46c5747256 Merge SkCodec with SkScanlineDecoder
Benefits:
- This mimics other decoding APIs (including the ones SkCodec relies
on, e.g. a png_struct, which can be used to decode an entire image or
one line at a time).

- It allows a client to ask us to do what we can do efficiently - i.e.
start from encoded data and either decode the whole thing or scanlines.

- It removes the duplicate methods which appeared in both SkCodec and
SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just
call fCodec->sameMethod()).

- It simplifies moving more checks into the base class (e.g. the
examples in skbug.com/4284).

BUG=skia:4175
BUG=skia:4284

=====================================================================

SkScanlineDecoder.h/.cpp:
Removed.

SkCodec.h/.cpp:
Add methods, enums, and variables which were previously in
SkScanlineDecoder.
Default fCurrScanline to -1, as a sentinel that start has not been
called.

General changes:
Convert SkScanlineDecoders to SkCodecs.

General changes in SkCodec subclasses:
Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned
an SkCodec, so they now call this-> instead of fCodec->.

SkBmpCodec.h/.cpp:
Replace the unused rowOrder method with an override for
onGetScanlineOrder.
Make getDstRow const, since it is called by onGetY, which is const.

SkCodec_libpng.h/.cpp:
Make SkPngCodec an abstract class, with two subclasses which handle
scanline decoding separately (they share code for decoding the entire
image). Reimplement onReallyHasAlpha so that it can return the most
recent result (e.g. after a scanline decode which only decoded part
of the image) or a better answer (e.g. if the whole image is known to
be opaque).
Compute fNumberPasses early, so we know which subclass to instantiate.
Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline
rather than a separate variable.

CodexTest.cpp:
Add tests for the state changes in SkCodec (need to call start before
decoding scanlines; calling getPixels means that start will need to
be called again before decoding more scanlines).
Add a test which decodes in stripes, currently only used for an
interlaced PNG.

TODO: Add tests for onReallyHasAlpha.

Review URL: https://codereview.chromium.org/1365313002
2015-09-30 08:57:14 -07:00
ssid
f0c986503b Add support for light dumps in SkTraceMemoryDump interface.
SkGlyphCache dumps too many glyphs, and to reduce the trace size,
RequestDetails enum is added to SkTraceMemoryDump interface. This
would tell caches to dump only requested details or not a detailed
dump.

BUG=499731

Review URL: https://codereview.chromium.org/1310123007
2015-09-30 04:31:23 -07:00
herb
62a69c26b3 Move Mutexy things to private.
There is no API change.

TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1368333004
2015-09-29 11:47:45 -07:00
robertphillips
05302f8f24 Handle inverted rects in SkRRect creation methods
An alternative way of addressing this is to alter SkCanvas::drawRoundRect to just reject isEmpty (i.e., un-sorted or truly empty) input rects.

BUG=skia:3786

Review URL: https://codereview.chromium.org/1373293002
2015-09-29 11:24:07 -07:00
bsalomon
e25eea4b36 Use child processors to implement compose color filter.
Review URL: https://codereview.chromium.org/1368423003
2015-09-29 06:38:55 -07:00
halcanary
c56c6ef3ce SkImage::NewFromBitmap works with Index8
BUG=skia:4390

Review URL: https://codereview.chromium.org/1377473002
2015-09-28 11:55:28 -07:00
herb
e6e41a8a19 Move SkAtomics.h to private.
There are no API changes.

TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1369333004
2015-09-28 11:24:13 -07:00
mtklein
449d9b7e2d simplify code in SkRecords.h
- use C++11 features ({} init, move constructors) to eliminate the need
     for explicit constructors
   - collapse RECORD0...RECORD8 into just one RECORD macro
   - explicitly tag record types instead of using member detectors.

Removing member detectors makes this code significantly less fragile.

This exposes a few places where we didn't really think through what to do
with SkDrawable.  I've marked them TODO for now.

BUG=skia:

Review URL: https://codereview.chromium.org/1360943003
2015-09-28 10:33:02 -07:00
reed
c9e190ddac Revert of change pixel-serializer to support reencoding existing data (patchset #5 id:80001 of https://codereview.chromium.org/1373683003/ )
Reason for revert:
Need to somehow get access to encoders in chrome -- link error on the roll since SkImageEncoder is not built as part of chrome.

Original issue's description:
> change pixel-serializer to support reencoding existing data
>
> Trying to evolve this interface so it can
> - support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
> - allow for encoding images as well as bitmaps (e.g. for picture serialization)
> - perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/13f48dc85aa68a60da66aaf39c93d527d11d1278

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

Review URL: https://codereview.chromium.org/1371983003
2015-09-28 09:58:41 -07:00