aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Merge SkCodec with SkScanlineDecoderGravatar scroggo2015-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix for default path renderer draws harlines without bloatingGravatar joshualitt2015-09-30
| | | | | | BUG=skia:3883 Review URL: https://codereview.chromium.org/1372973003
* Add support for light dumps in SkTraceMemoryDump interface.Gravatar ssid2015-09-30
| | | | | | | | | | | 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
* remove unused helper functionGravatar reed2015-09-29
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1376603006
* Unify ThreadID.Gravatar herb2015-09-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1371303003
* try texture-maker to generalize stretching for npot and min-tex-sizeGravatar reed2015-09-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1376603002
* cmake tweaksGravatar mtklein2015-09-29
| | | | | | | | | | | | | | | | | | • -w silences all warnings current and future. We're not using this for development. • There's no real need to exclude files in Release mode. The linker may whine a little, but that's fine. • Quiet down message() calls that run every time. They're fine if you can figure out how to run them only when doing the detection and cache them like all the others, but I don't like the noise seeing them every run. • cheaders is hard to read. c_headers. • ../src/*mac* erroneously picks up SkLumaColorFilter on non-case-sensitive file systems. ../src/*_mac* seems fine. CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot BUG=skia: Review URL: https://codereview.chromium.org/1376923003
* Revert of Implement SkImageFilter::Cache with SkResourceCache. (patchset #8 ↵Gravatar mtklein2015-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/1370323002/ ) Reason for revert: Landed PS8 temporarily to trigger the perf bots. Original issue's description: > Implement SkImageFilter::Cache with SkResourceCache. > > The single global cache now uses the global SkResourceCache, > and any Create()ed cache uses a local SkResourceCache. > > No real public API changes (and only deletes). > > I don't see any pixel diffs on .skps or GMs. > Don't see any significant perf difference on 8888 or gpu configs. > DM peak memory usage did drop by about 113M, close to the 128M cache size. > > BUG=skia:3662 > > Landing PS8 temporarily to trigger the perf bots. > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/75135d8ae1aa12e8e6bfce63291e5e876a77546f TBR=reed@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3662 Review URL: https://codereview.chromium.org/1381523002
* Implement SkImageFilter::Cache with SkResourceCache.Gravatar mtklein2015-09-29
| | | | | | | | | | | | | | | | | | The single global cache now uses the global SkResourceCache, and any Create()ed cache uses a local SkResourceCache. No real public API changes (and only deletes). I don't see any pixel diffs on .skps or GMs. Don't see any significant perf difference on 8888 or gpu configs. DM peak memory usage did drop by about 113M, close to the 128M cache size. BUG=skia:3662 Landing PS8 temporarily to trigger the perf bots. TBR=reed@google.com Review URL: https://codereview.chromium.org/1370323002
* Move Mutexy things to private.Gravatar herb2015-09-29
| | | | | | | | | | There is no API change. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1368333004
* Handle inverted rects in SkRRect creation methodsGravatar robertphillips2015-09-29
| | | | | | | | 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
* update memset16/32 inlining heuristicsGravatar mtklein2015-09-29
| | | | | | | | | | | | | | | | | | | | | I spent some time looking at perf.skia.org and it looks like we can do better. It is weird, weird, weird that on x86, we see three completely different behaviors: - x86 Android: inlining better for small N, custom better for large N; - Windows: inlining better for large N, custom better for small N; - other x86: inlining generally better BUG=skia:4316,chromium:516426 Committed: https://skia.googlesource.com/skia/+/b68fa409fc00ce2f38e2a0fd6f9dc2379b372481 Summaries: https://perf.skia.org/#4179 All traces, log scale: https://perf.skia.org/#4180 TBR=reed@google.com No public API changes. Review URL: https://codereview.chromium.org/1357193002
* skia: roll ANGLE and remove compile flagsGravatar hendrikw2015-09-29
| | | | | | | Recent angle change allows us to remove some of the ANGLE specific compile flags Review URL: https://codereview.chromium.org/1376803003
* Revert of By default purge resources that haven't been used for 64 flushes ↵Gravatar bsalomon2015-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #5 id:80001 of https://codereview.chromium.org/1316233003/ ) Reason for revert: Breaking conformance test again Original issue's description: > By default purge resources that haven't been used for 64 flushes > > BUG=skia:4258 > > Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104 > > R=robertphillips@google.com > > Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54 > > Committed: https://skia.googlesource.com/skia/+/bd783cd5b62118277b75933c3cd7b9097129259a > > Committed: https://skia.googlesource.com/skia/+/198a350051824229aa89a5d6348f5a7fc875c9ca TBR=robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4258 Review URL: https://codereview.chromium.org/1374933004
* Have /src files use header directly.Gravatar herb2015-09-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1373253003
* By default purge resources that haven't been used for 64 flushesGravatar bsalomon2015-09-29
| | | | | | | | | | | | | | BUG=skia:4258 Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104 R=robertphillips@google.com Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54 Committed: https://skia.googlesource.com/skia/+/bd783cd5b62118277b75933c3cd7b9097129259a Review URL: https://codereview.chromium.org/1316233003
* Use child processors to implement compose color filter.Gravatar bsalomon2015-09-29
| | | | Review URL: https://codereview.chromium.org/1368423003
* SkImage::NewFromBitmap works with Index8Gravatar halcanary2015-09-28
| | | | | | BUG=skia:4390 Review URL: https://codereview.chromium.org/1377473002
* DM: PDFSink sets rasterizer keywordGravatar halcanary2015-09-28
| | | | Review URL: https://codereview.chromium.org/1376573002
* Move SkAtomics.h to private.Gravatar herb2015-09-28
| | | | | | | | | | There are no API changes. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1369333004
* Move code search info to sub-page. Add additional code search options.Gravatar benjaminwagner2015-09-28
| | | | | | | | BUG=skia: NOTRY=true DOCS_PREVIEW= https://skia.org/?cl=1375523003 Review URL: https://codereview.chromium.org/1375523003
* Make SkPath fFirstDirection atomic to fix tsan.Gravatar herb2015-09-28
| | | | | | | | | | There is no API change. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1372103003
* simplify code in SkRecords.hGravatar mtklein2015-09-28
| | | | | | | | | | | | | | | | - 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
* Revert of Revert[2] of add ImageShader, sharing code with its Bitmap cousin ↵Gravatar reed2015-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #11 id:200001 of https://codereview.chromium.org/1352293002/ ) Reason for revert: guess: Need to handle NPOT support in shader case Original issue's description: > Revert[2] of add ImageShader, sharing code with its Bitmap cousin > > Adjustment from previous land : runtime check for npot-support when texture is requested for tiling. > > (patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ ) > > This reverts commit f2608513626264459a00388537175600b515cae2. > > BUG=skia:4365 > > Committed: https://skia.googlesource.com/skia/+/fe05707c356d2a8c2c69222591d4cafbd456b4e5 TBR=fmalita@chromium.org,robertphillips@google.com,bsalomon@google.com,reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4365 Review URL: https://codereview.chromium.org/1375673002
* Revert of change pixel-serializer to support reencoding existing data ↵Gravatar reed2015-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Revert of SkImage-backed SkPictureShader (patchset #4 id:60001 of ↵Gravatar robertphillips2015-09-28
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1343153003/ ) Reason for revert: This CL appears to be breaking the pictureshader, pictureshadertile and tiled_picture_shader GMs on the iPad4 and the N7. The artifact is black rectangles. Original issue's description: > SkImage-backed SkPictureShader > > Instead of using an explicit image generator + SkBitmap + bitmap shader, > switch to the shiny new SkImage/image generator/image shader. > > R=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/97be9a0c86eedd8ab85ae7d9aaccb0b0a8e4577d TBR=reed@google.com,fmalita@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1374763003
* Add cast and assignment operators to SkAtomic.Gravatar herb2015-09-28
| | | | | | | | | | This is not really an API change. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1369333002
* change pixel-serializer to support reencoding existing dataGravatar reed2015-09-28
| | | | | | | | | | | 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: Review URL: https://codereview.chromium.org/1373683003
* SkBlockMemoryStream: correct test in getMemoryBase().Gravatar halcanary2015-09-28
| | | | | | | | | The test "nullptr == fBlockMemory->fHead->fNext" tests that all of the data is in one block, but it is also necessary to test "fBlockMemory->fHead" to ensure that there is a first block with data in it. Review URL: https://codereview.chromium.org/1374493002
* Make skpaint->grpaint flow work for composing draws (verts and atlas)Gravatar bsalomon2015-09-28
| | | | | | One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color. Review URL: https://codereview.chromium.org/1348583002
* EdgeClip demo to show scan-converter clipping behaviorGravatar reed2015-09-28
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1367373002
* Update SKP versionGravatar update-skps2015-09-27
| | | | | | | | | Automatic commit by the RecreateSKPs bot. TBR= NO_MERGE_BUILDS Review URL: https://codereview.chromium.org/1369923002
* SkImage-backed SkPictureShaderGravatar fmalita2015-09-25
| | | | | | | | | Instead of using an explicit image generator + SkBitmap + bitmap shader, switch to the shiny new SkImage/image generator/image shader. R=reed@google.com Review URL: https://codereview.chromium.org/1343153003
* Remove SkBitmapSourceGravatar fmalita2015-09-25
| | | | | | | | | To avoid breaking existing SKPs, add a deserialization stub which unflattens SkBitmapSource records to SkImageSources. R=reed@google.com,mtklein@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/1363913002
* SkInstallDiscardablePixelRef is deprecated, enforce thatGravatar reed2015-09-25
| | | | | | | | | No functionality change, just a renaming. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1372593002
* use override to make the new xcode happierGravatar reed2015-09-25
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1368673004
* Revert[2] of add ImageShader, sharing code with its Bitmap cousinGravatar reed2015-09-25
| | | | | | | | | | | | Adjustment from previous land : runtime check for npot-support when texture is requested for tiling. (patchset #10 id:180001 of https://codereview.chromium.org/1342113002/ ) This reverts commit f2608513626264459a00388537175600b515cae2. BUG=skia:4365 Review URL: https://codereview.chromium.org/1352293002
* Eliminate some clutter in SkFlattenableGravatar mdempsky2015-09-24
| | | | | | | | | | | | | | | | | | | | | The Registrar class is unnecessary, as SkFlattenable factory registration is now handled via initialization routines that can just call the Register function directly. Also, no need to lazily initialize gCount to 0, as initializing an int to a constant value does not require dynamic initialization. (C++ actually guarantees zero initialization of global ints anyway, but existing practice in Skia appears to favor the explicit "= 0"). Relatedly, this requires removing the unused/unimplemented SkLayerDrawLooper::MyRegistrar class. And removing that allows Clang to realize that SkLayerDrawLooper::fTopRec is unneeded too, so remove that too to squelch the compiler warning/error. This doesn't change any public API. TBR=reed@google.com Review URL: https://codereview.chromium.org/1361323002
* stop scaling loops and improve warmup benchGravatar joshualitt2015-09-24
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1363663004
* Fix leak in ResourceCache testGravatar Brian Salomon2015-09-24
| | | | Review URL: https://codereview.chromium.org/1359333004 .
* SkPDF Implement colorfilters on bitmapsGravatar halcanary2015-09-24
| | | | | | BUG=484583 Review URL: https://codereview.chromium.org/1367993002
* Make drawbitmaprect GM use Ganesh-backed bitmaps and imagesGravatar robertphillips2015-09-24
| | | | | | This is left over from trying to repro Android not serializing Ganesh-backed bitmaps Review URL: https://codereview.chromium.org/1353313002
* Add warmup bench to visual benchGravatar joshualitt2015-09-24
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1358373003
* Remove SkImage::newImage()Gravatar fmalita2015-09-24
| | | | | | | | All clients converted to newSubset(). R=reed@google.com Review URL: https://codereview.chromium.org/1364263002
* Make mutex semaphore based.Gravatar herb2015-09-24
| | | | | | | | | | | | This implementation improves performance of SkMutex acquire / release pair from 42ns -> 13 ns. SkSharedMutex and SkSpinlock have the same performance. It also removes specialized windows and linux/mac code. BUG=skia: Review URL: https://codereview.chromium.org/1359733002
* Make methods on GrGpuResource safe to call on abandoned resourceGravatar bsalomon2015-09-24
| | | | | | BUG=chromium:528908 Review URL: https://codereview.chromium.org/1367533004
* Fix GrDrawVerticesBatch to work with override colors and eliminate local ↵Gravatar bsalomon2015-09-24
| | | | | | coords when posssible. Review URL: https://codereview.chromium.org/1365673003
* Improve debugger's visualization of transparent texturesGravatar robertphillips2015-09-24
| | | | Review URL: https://codereview.chromium.org/1362693003
* Blacklist ReadPixels on GalaxyS4 due to skia:4368.Gravatar benjaminwagner2015-09-24
| | | | | | BUG=skia:4368 Review URL: https://codereview.chromium.org/1366723002
* Mangle output var in GrGLFragmentProcessor::emitChildGravatar bsalomon2015-09-24
| | | | | | R=joshualitt@google.com Review URL: https://codereview.chromium.org/1362873002