Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.
Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.
SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.
Review URL: https://codereview.chromium.org/1507123002
Recent house cleaning has broken the debugger - mainly around the defunct profiling feature. This makes CL it even more defunct.
Review URL: https://codereview.chromium.org/1416723006
Add two drawPicture bracketing ops (BeginDrawPicture, EndDrawPicture) to
replace the current DrawPicture op, and flatten picture contents.
Review URL: https://codereview.chromium.org/1048383002
Displaying the offset into an SkPicture hasn't worked for a while so this CL deletes the feature.
When "Save Layer" was renamed to "SaveLayer" the code that computes the indent in the list view was broken. This CL patches the problem.
Review URL: https://codereview.chromium.org/1034733004
Qt changes the context on many conditions. Abandon GrContext
in these cases.
Also call GrContext::resetContext during Qt GL paint callback,
the GL state may be touched by Qt.
Fixes the bug where changing between gpu and msaa would start
erroring in framebuffer binds, if the .skp had many layers.
Review URL: https://codereview.chromium.org/915573002
SkStream is a stateful object, so it does not make sense for it to have
multiple owners. Make SkStream inherit directly from SkNoncopyable.
Update methods which previously called SkStream::ref() (e.g.
SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(),
which required the existing owners to call SkStream::unref()) to take
ownership of their SkStream parameters and delete when done (including
on failure).
Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some
cases this means heap allocating streams that were previously stack
allocated.
Respect ownership rules of SkTypeface::CreateFromStream() and
SkImageDecoder::buildTileIndex().
Update the comments for exceptional methods which do not affect the
ownership of their SkStream parameters (e.g.
SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be
explicit about ownership.
Remove test_stream_life, which tested that buildTileIndex() behaved
correctly when SkStream was a ref counted object. The test does not
make sense now that it is not.
In SkPDFStream, remove the SkMemoryStream member. Instead of using it,
create a new SkMemoryStream to pass to fDataStream (which is now an
SkAutoTDelete).
Make other pdf rasterizers behave like SkPDFDocumentToBitmap.
SkPDFDocumentToBitmap delete the SkStream, so do the same in the
following pdf rasterizers:
SkPopplerRasterizePDF
SkNativeRasterizePDF
SkNoRasterizePDF
Requires a change to Android, which currently treats SkStreams as ref
counted objects.
Review URL: https://codereview.chromium.org/849103004
The SkDebugCanvas can be (or is currently) being used to draw to multiple
different canvases. If this use-case is intended, then storing draw
-related state in the canvas causes bugs.
Remove incremental draw from SkDebugCanvas. It can only optimize the
case where draw command index is advanced, no other changes are done
and no visualization is used. This case is not that critical, as it
happens only once per new frame at most. It causes bugs, because
one SkDebugCanvas is used to draw to multiple canvases.
Leave the draw to canvas in same state as it was passed in.
This fixes the debugger bugs where:
* Old, stale image would stay on the raster canvas when a new image is
loaded. Also happened with resizes.
* Proper image for overdraw filter would be visible only for the first
frame
Review URL: https://codereview.chromium.org/844493003
Rasterize the picture only when it changes, not every time
raster widget paints itself.
Removes include SkForceLinking.h while organizing the SkDebuggerGUI.cpp
includes.
This is part of the work trying to remove bugs that come from
SkDebugCanvas stateful draw. Part of the state comes from some
optimization that this tries to reproduce in a different way.
Review URL: https://codereview.chromium.org/839743003
Make all fields of inspector view (details tab, clipstack tab, geometry
view) update the correct info when user selects a draw command. Also
update the info regardless if the painting is paused or not.
Current clip and matrix will not update consistently even after this
patch, as they depend on stateful debug canvas draw (may be fixed
later).
Review URL: https://codereview.chromium.org/835903002
The SkDebugCanvas can be (or is currently) being used to draw to multiple
different canvases. If this use-case is intended, then storing draw
-related state in the canvas causes bugs.
Remove draw window size state form SkDebugCanvas. Instead, use the canvas
base layer size as the window size to clip to. This is consistent with
the current use in debugger.
This is part of work trying to remove bugs in debugger that result from
replaying one SkDrawCanvas to two different canvases. Currently the
SkDrawCanvas stores state that can only be valid if it is used for one
canvas.
Review URL: https://codereview.chromium.org/835113002
Update the picture view in the debugger when the first command is
selected. DebugCanvas::drawTo(index) draws up to and including the index.
Review URL: https://codereview.chromium.org/837483002