Reason for revert:
Test is SkASSERTing on Macs, e.g:
http://chromegw.corp.google.com/i/client.skia/builders/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug/builds/257/steps/dm/logs/stdio
210 tasks left 1737M peak 1ms test FrontBufferedStream../../src/ports/SkImageDecoder_CG.cpp:43: failed assertion "data"
Signal 11:
_sigtramp (+0x1a)
SkStreamToCGImageSource(SkStream*) (+0x62)
SkImageDecoder_CG::onDecode(SkStream*, SkBitmap*, SkImageDecoder::Mode) (+0x2e)
SkImageDecoder::decode(SkStream*, SkBitmap*, SkColorType, SkImageDecoder::Mode) (+0x81)
SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*, SkColorType, SkImageDecoder::Mode, SkImageDecoder::Format*) (+0xff)
SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*) (+0x31)
test_ShortFrontBufferedStream(skiatest::Reporter*) (+0x97)
skiatest::ShortFrontBufferedStreamClass::onRun(skiatest::Reporter*) (+0x19)
skiatest::Test::run() (+0x7c)
DM::CpuTestTask::draw() (+0x5a)
DM::CpuTask::run() (+0x9e)
non-virtual thunk to DM::CpuTask::run() (+0x1c)
(anonymous namespace)::ThreadPool::Loop(void*) (+0xf4)
thread_start(void*) (+0x54)
_pthread_start (+0x14b)
Original issue's description:
> Add test for new FrontBufferedStream behavior.
>
> Test for https://skia.googlesource.com/skia/+/dd5a1e094c19fa10202c37c50a1f799e5af5dac0
>
> Verify that FrontBufferedStream does not attempt to read beyond the
> end of its underlying stream.
>
> Committed: https://skia.googlesource.com/skia/+/da59f05c6738dbb9a92cad21c608cdfae53a76b2TBR=reed@google.com,scroggo@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/649553003
This restructures the vertex allocation for text rendering to compute
the max number of vertices we would need for a line of text, and then
only allocate that much. If this number exceeds the quad index limit,
then it will allocate for the max number of quads, and reallocate for
the rest later.
Review URL: https://codereview.chromium.org/663423003
CanvasTest only checks if the state of the different canvas
implementations are consistent with the one of the default
implementation.
Because most of the draw calls are stateless and already tested in GMs
the test steps that exercices them are not useful.
BUG=skia:3054
Review URL: https://codereview.chromium.org/672273002
This will enable clients to pass more than one bcp47 tag to ensure
that the most appropriate font is selected.
BUG=chromium:422180
Review URL: https://codereview.chromium.org/670243002
Add a new enum to differentiate between a complete decode and a
partial decode (with the third value being failure). Return this
value from SkImageDecoder::onDecode (in all subclasses, plus
SkImageDecoder_empty) and ::decode.
For convenience, if the enum is treated as a boolean, success and
partial success are both considered true.
Note that the static helper functions (DecodeFile etc) still return
true and false (for one thing, this allows us to continue to use
SkImageDecoder::DecodeMemory as an SkPicture::InstallPixelRefProc in
SkPicture::CreateFromStream).
Also correctly report failure in SkASTCImageDecoder::onDecode when
SkTextureCompressor::DecompressBufferFromFormat fails.
BUG=skia:3037
BUG:b/17419670
Review URL: https://codereview.chromium.org/647023006
Add a unique-per-subclass namespace tag to make Keys from different
domains comparable.
Also drop the SkPictureShader cache and convert to using the global
resource cache instead.
R=reed@google.com,mtklein@google.com,robertphillips@google.com
Review URL: https://codereview.chromium.org/668223002
Instead of taking a Bitmap as an argument this version
takes only the type of content (None/Opaque/Transparent).
This will be used to check the opaqueness of a SkPaint
that draws a SkImage.
BUG=skia:3042
Review URL: https://codereview.chromium.org/663233002
Replace the current/naive shader caching mechanism with a more general
implementation based on SkResourceCache.
Caching the bitmap shader itself (as opposed to just the tile bitmap)
makes for a chunkier key, but OTOH avoids allocating new shaders on
cache hit.
R=reed@google.com,mtklein@google.com
Review URL: https://codereview.chromium.org/671683004
The accumulated matrix state of any enclosing SkPictures must be stored separate from the picture-local CTM. Any setMatrix calls inside a layer need to replace the picture-local CTM but concatenate with the enclosing SkPicture transform state (and the transform state needed to translate the layer to the correct location in the cached GrTexture).
Review URL: https://codereview.chromium.org/639863005
GrAARectRenderer::fillAANestedRects only handles thin stroked rects correctly if the margins are all the same. It is also correct if all the margins are >= 1.0f. This CL allows such cases to use the fillAANestedRects fast path.
This seems to halve the gpu rendering time of the picture in bug crbug.com/425427.
Review URL: https://codereview.chromium.org/672473002
- remove unused method and obsolete note
- add a reminder that yes, we are checking counts are equal
BUG=skia:
Review URL: https://codereview.chromium.org/667993002
Without this patch the SaveAs functionality only copies the portion of the picture from the current command in the GUI.
Review URL: https://codereview.chromium.org/672453002
In FrontBufferedStream, when attempting to read and buffer more
data, do not try to read if the underlying stream is at the end.
Prevents a bug where we continue trying to read a stream that
has nothing more to read.
Review URL: https://codereview.chromium.org/665303002