aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
Commit message (Collapse)AuthorAge
* simplify gm matricesGravatar Mike Reed2017-08-08
| | | | | | | | | | | | rm gm that appears to have been there solely for pdf, but we don't use it for that now. Bug: skia: Change-Id: I3cf88db923c2445b7c95dda14da679a594117643 Reviewed-on: https://skia-review.googlesource.com/31760 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add missing newline to initial DM outputGravatar Brian Osman2017-08-03
| | | | | | | | Bug: skia: Change-Id: I505e5c339947e9fc8bbec6acefc48ee9f47c96d2 Reviewed-on: https://skia-review.googlesource.com/30581 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Roll ANGLEGravatar Robert Phillips2017-08-01
| | | | | | | | | | | https://chromium.googlesource.com/angle/angle.git/+log/cce8965d2c58..878c8b1e5e89 ANGLE now crashes (on program compilation) if there isn't a flush between uses of different flavors of ANGLE context (e.g., angle_gl_es2 vs. angle_gl_es3). Change-Id: If59b6ec683e682db5214bb002a70863cee5fe013 Reviewed-on: https://skia-review.googlesource.com/28865 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* New analytic AA scan converter using delta (I call it DAA for now)Gravatar Yuqian Li2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAA is: 1. Much simpler than AAA. SkScan_AAAPath.cpp is about 1700 lines. SkScan_DAAPath.cpp is about 300 lines. The whole DAA CL is only about 800 lines. 2. Much faster than AAA for complicated paths. The speedup applies to GL backend (including ccpr)! Here's the frame time of 'SampleApp --slide Chart' on macbook pro: AAA-raster: 33ms DAA-raster: 21ms AAA-gl: 30ms DAA-gl: 20ms AAA-ccpr: 18ms DAA-ccpr: 12ms My linux desktop doesn't have SSE3 so the speedup is smaller (~25% for Chart). I believe that DAA is so fast that I can enable it for any paths (AAA is not enabled by default for complicated paths because it is slow; hence our older supersampling scan converter is used for stroking on Chart for AAA-xxx config.) 3. The SkCoverageDelta is suitable for threaded backend with out-of-order concurrent scan conversion as commented in the source code. Maybe we can also just send deltas to GPU. 4. Similar to most analytic path renderers, the quality is on the best ground-truth level, unless there are intersections within a pixel. The intersections look good to my eyes although theoretically that could be arbitrary far from the ground truth (see my AAA slides). 5. For simple paths, such as circle, triangle, rrect, etc., DAA is slower than AAA. But DAA is faster than our older supersampling scan converter in most cases. As those simple paths usually don't constitute the bottleneck of a picture (skp or svg), I strongly recommend use DAA. 6. DAA also heavily favors blitMask so it may work quite well with SkRasterPipeline and SkRasterPipelineBlitter. Finally, please check https://skia-review.googlesource.com/c/22420/ which accelerate DAA by specializing blitCoverageDeltas for SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%) speedup. But I couldn't figure out how to reduce the duplicate code so I don't intend to land it. Bug: skia: Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c Reviewed-on: https://skia-review.googlesource.com/19666 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* use unique_ptr for codec factoriesGravatar Mike Reed2017-07-25
| | | | | | | | | | Will need guards for android (at least) Bug: skia: Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947 Reviewed-on: https://skia-review.googlesource.com/26040 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNCGravatar Mike Klein2017-07-24
| | | | | | | Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6 Reviewed-on: https://skia-review.googlesource.com/26361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Faster, thread-safe implementationGravatar Brian Osman2017-07-24
| | | | | | | | | Bug: skia: Change-Id: I401c5a9885c348aa424ab07b094acecddb209490 Reviewed-on: https://skia-review.googlesource.com/25860 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Don't write .pdfs in DM on the bots.Gravatar Mike Klein2017-07-24
| | | | | | | | | | | They take a long time to upload, and we don't do anything with them. BUG=skia:6821 Change-Id: I16c5fc423953fa3e9d0dcb184ecbbe23f3918357 Reviewed-on: https://skia-review.googlesource.com/26142 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* DM: excercise other SkPDF raster dpisGravatar Hal Canary2017-07-20
| | | | | | | | Change-Id: Ia50661a8391da526d509adbe2d7203866c140b1c Reviewed-on: https://skia-review.googlesource.com/25321 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* First stab at JSON event tracerGravatar Brian Osman2017-07-20
| | | | | | | | | | | | | | | | | | | | Not yet thread safe (so it forces threading off). Builds JSON on the fly, so overhead is certainly bad. Plan to fix all of that, but this at least "works". There is now one tracing flag: 'trace'. - 'debugf' installs the SkDebugf tracer. - 'atrace' installs the Android ATrace tracer. - Any other value is interpreted as a filename, and produces a JSON file for chrome://tracing. All three modes work in DM, nanobench, and Viewer. Bug: skia: Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364 Reviewed-on: https://skia-review.googlesource.com/24781 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* convert over to 2d-modeGravatar Mike Klein2017-07-20
| | | | | | | | | | | | [√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible [√] convert compile to 2d also, remove 1d run/compile [√] convert all call sites [√] no diffs Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43 Reviewed-on: https://skia-review.googlesource.com/24263 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Add option to ignore SIGINT when running DM on Android.Gravatar Derek Sollenberger2017-07-20
| | | | | | | | | Bug: skia:6856 Change-Id: Iaaad2c22988cf8058304b7396c7d24eacd2f3edb Reviewed-on: https://skia-review.googlesource.com/24745 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Add SkDebugf trace event handler.Gravatar Brian Salomon2017-07-19
| | | | | | | | | Also adds more trace events to GPU backend. Change-Id: Ifa5f0cd4b1fd582f0cc30d37d9e6414dc498c75d Reviewed-on: https://skia-review.googlesource.com/24622 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* guard references to SkColorTableGravatar Mike Reed2017-07-18
| | | | | | | | Bug: skia:6828 Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108 Reviewed-on: https://skia-review.googlesource.com/24260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add support for GL 565 and 4444 configs to test toolsGravatar Brian Salomon2017-07-17
| | | | | | | Change-Id: I395e3387df44cf5370fef6ab73db73228225622f Reviewed-on: https://skia-review.googlesource.com/23946 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add metal config to toolsGravatar Greg Daniel2017-07-14
| | | | | | | | | Bug: skia: Change-Id: I84dbd56c17d4856496af4491f340ec560e29c8a6 Reviewed-on: https://skia-review.googlesource.com/23200 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* remove references to kIndex_8_SkColorType from our tools/testsGravatar Mike Reed2017-07-12
| | | | | | | | | Bug: skia:6828 Change-Id: Ib5049c28c11b7320bece20f5a0a886de8b2a4343 Reviewed-on: https://skia-review.googlesource.com/22728 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Reland "Remove support for decoding to kIndex_8"Gravatar Leon Scroggins2017-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change's description: > > Remove support for decoding to kIndex_8 > > > > Fix up callsites, and remove tests that no longer make sense. > > > > Bug: skia:6828 > > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 > > Reviewed-on: https://skia-review.googlesource.com/21664 > > Reviewed-by: Derek Sollenberger <djsollen@google.com> > > Commit-Queue: Leon Scroggins <scroggo@google.com> > > TBR=djsollen@google.com,scroggo@google.com > > Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:6828 > Reviewed-on: https://skia-review.googlesource.com/22120 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=djsollen@google.com,scroggo@google.com Bug: skia:6828 Change-Id: I36ff5a11c529d29e8adc95f43b8edc6fd1dbf5b8 Reviewed-on: https://skia-review.googlesource.com/22320 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Remove support for decoding to kIndex_8"Gravatar Leon Scroggins2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 742a3e298fda669006147e4a305bab8452369b1f. Reason for revert: Breaking Android roll: frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorPtr = colorPtr; ~~~~~~~~~~~~ ^ frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorCount = colorCount; ~~~~~~~~~~~~ ^ Original change's description: > Remove support for decoding to kIndex_8 > > Fix up callsites, and remove tests that no longer make sense. > > Bug: skia:6828 > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 > Reviewed-on: https://skia-review.googlesource.com/21664 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=djsollen@google.com,scroggo@google.com Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6828 Reviewed-on: https://skia-review.googlesource.com/22120 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Remove support for decoding to kIndex_8Gravatar Leon Scroggins III2017-07-10
| | | | | | | | | | Fix up callsites, and remove tests that no longer make sense. Bug: skia:6828 Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 Reviewed-on: https://skia-review.googlesource.com/21664 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add SkCodec::Result indicating error in the dataGravatar Leon Scroggins III2017-07-06
| | | | | | | | | | | | | | | | | | Previously, SkGifCodec treated an error in the LZW data as incomplete, since we can still draw the partially decoded image. But a client doing incremental decodes needs to distinguish this from truly incomplete data. In the case of an error, the client should not attempt to provide more data and decode again. Add kErrorInInput, and return it when SkGifCodec sees a fatal error. Treat it the same as kIncompleteInput when it comes to filling and DM. Bug: skia:6825 Change-Id: Ic6ce3a62c0b065ed34dcd8006309e43272a3db9f Reviewed-on: https://skia-review.googlesource.com/21530 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Chris Blume <cblume@chromium.org>
* add --forceRasterPipeline to dm, (already in nanobench)Gravatar Mike Reed2017-07-06
| | | | | | | | Bug: skia: Change-Id: I0e5f7dd2aaa03340687cdfe5578c8697088cd714 Reviewed-on: https://skia-review.googlesource.com/21532 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Remove CodecSrc::kIndex8_Always_DstColorTypeGravatar Leon Scroggins III2017-07-05
| | | | | | | | | | We have removed support for drawing Index8, so stop testing it in DM. Bug: skia: 6828 Change-Id: Ib2c4d3ebd371be704151a9f956c0ca2aaf2926a6 Reviewed-on: https://skia-review.googlesource.com/21525 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* always touch verbose.log, even if --verboseGravatar Mike Klein2017-06-26
| | | | | | | | | | | | This lets us run bots that upload images with --verbose. Today we're getting away with --verbose on some bots because they happen to skip upload. Change-Id: If915a65987b43c945263ada7751bf36aedff605a Reviewed-on: https://skia-review.googlesource.com/20834 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* remove DM status threadGravatar Mike Klein2017-06-23
| | | | | | | | | | | Let's see if this helps iOS? BUG=skia:6748 Change-Id: Iec67eacef0058dfb79c0223a955a22c676a35278 Reviewed-on: https://skia-review.googlesource.com/20683 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Enable SVG DM sources for vector sinksGravatar Florin Malita2017-06-16
| | | | | | | | | SVG->SKP is a useful/valid case. Change-Id: I81fd7b8d5e422b4dbf55f59eca9e9471ab578180 Reviewed-on: https://skia-review.googlesource.com/20153 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "Add API for flushing surfaces with gpu semaphores""Gravatar Greg Daniel2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792. This change relands the original plus the follow on change: https://skia-review.googlesource.com/20059. Additionally it adds a blacklist for the mac intel bots which don't see to respect the added fences on the GPU. Original change's description: > Revert "Add API for flushing surfaces with gpu semaphores" > > This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. > > Reason for revert: Failing test on mac bots > > Original change's description: > > Add API for flushing surfaces with gpu semaphores > > > > BUG=skia: > > > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > > Reviewed-on: https://skia-review.googlesource.com/11488 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Forrest Reiling <freiling@google.com> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com > > Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/20063 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1 Reviewed-on: https://skia-review.googlesource.com/20141 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Add API for flushing surfaces with gpu semaphores"Gravatar Greg Daniel2017-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62. Reason for revert: Failing test on mac bots Original change's description: > Add API for flushing surfaces with gpu semaphores > > BUG=skia: > > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 > Reviewed-on: https://skia-review.googlesource.com/11488 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Forrest Reiling <freiling@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20063 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add API for flushing surfaces with gpu semaphoresGravatar Greg Daniel2017-06-15
| | | | | | | | | | BUG=skia: Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1 Reviewed-on: https://skia-review.googlesource.com/11488 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Forrest Reiling <freiling@google.com>
* Revert "Revert "Do not return Index8 from ↵Gravatar Matt Sarett2017-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkAndroidCodec::computeOutputColorType"" This reverts commit 81c83a7db4e524b19d33bf7c8a9b537b9d606c93. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Do not return Index8 from SkAndroidCodec::computeOutputColorType" > > This reverts commit b6f4767294261dca3beef6f280c4bac69df3f930. > > Reason for revert: This breaks CTS tests in Android. Doh. > > Original change's description: > > Do not return Index8 from SkAndroidCodec::computeOutputColorType > > > > Given that this is the only known use of Index8 color type, > > this is essentially an experimental delete. > > > > Bug: skia:6620 > > Change-Id: Ib363d237e0217f6e7f461a62e54d32892c428095 > > Reviewed-on: https://skia-review.googlesource.com/10586 > > Reviewed-by: Leon Scroggins <scroggo@google.com> > > Commit-Queue: Matt Sarett <msarett@google.com> > > TBR=msarett@google.com,scroggo@google.com,reed@google.com > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:6620 > > Change-Id: I2b44c695b8b95659520e9532901f636f56e01e2a > Reviewed-on: https://skia-review.googlesource.com/19084 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:6620 Change-Id: I7e4e3a5ec068102244ad3a0259aa6aded4f12f36 Reviewed-on: https://skia-review.googlesource.com/19802 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* DM: use SkPngEncoderGravatar Mike Klein2017-06-12
| | | | | | | Change-Id: If1360bee50c8c360e4b1edf09c8a39aa32a59eb9 Reviewed-on: https://skia-review.googlesource.com/19520 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add clamp before drawing F16->8888 in DMSrcSink ColorCodecSrcGravatar Matt Sarett2017-06-09
| | | | | | | | | | | Verified that this fixes the wrongness of a few of the colorImage diffs in Gold. Bug: skia:6738 Change-Id: Icf0b7573ccb87268b480d7cc0a6cfe6fa8ae73f7 Reviewed-on: https://skia-review.googlesource.com/19271 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Do not return Index8 from SkAndroidCodec::computeOutputColorType"Gravatar Matt Sarett2017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b6f4767294261dca3beef6f280c4bac69df3f930. Reason for revert: This breaks CTS tests in Android. Doh. Original change's description: > Do not return Index8 from SkAndroidCodec::computeOutputColorType > > Given that this is the only known use of Index8 color type, > this is essentially an experimental delete. > > Bug: skia:6620 > Change-Id: Ib363d237e0217f6e7f461a62e54d32892c428095 > Reviewed-on: https://skia-review.googlesource.com/10586 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> TBR=msarett@google.com,scroggo@google.com,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6620 Change-Id: I2b44c695b8b95659520e9532901f636f56e01e2a Reviewed-on: https://skia-review.googlesource.com/19084 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Do not return Index8 from SkAndroidCodec::computeOutputColorTypeGravatar Matt Sarett2017-06-08
| | | | | | | | | | | Given that this is the only known use of Index8 color type, this is essentially an experimental delete. Bug: skia:6620 Change-Id: Ib363d237e0217f6e7f461a62e54d32892c428095 Reviewed-on: https://skia-review.googlesource.com/10586 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Make SkCodec more flexible about its required frameGravatar Leon Scroggins III2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkCodec sets fRequiredFrame to be the earliest possible frame that a given frame can depend on. e.g. - Frame A fills the screen, Keep - Frame B does not cover A, Keep - Frame C covers B but not A, and is opaque Frame C can depend on either A or B. SkCodec already reports that C depends on A. This CL allows a client of SkCodec to use either A or B to create C. Also expose the DisposalMethod. Since any frame between A and C can be used to create C except for DisposePrevious frames, the client needs to be able to know the disposal method so they do not try to use such a frame to create C. Further, the disposal method can be used to give the client a better idea whether they will continue to need a frame. (e.g. if frame i is DisposePrevious and depends on i-1, the client may not want to steal i-1 to create i, since i+1 may also depend on i-1.) TODO: Share code for decoding prior frames between GIF and WEBP Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6 Reviewed-on: https://skia-review.googlesource.com/13722 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Remove ImmediateFlush modeGravatar Robert Phillips2017-06-02
| | | | | | | Change-Id: I7db113e66d81516b2beb5eefeddf488d9bfed2e5 Reviewed-on: https://skia-review.googlesource.com/18488 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* update SkRasterPipeline::run() to also take yGravatar Mike Klein2017-06-01
| | | | | | | | | y isn't used yet. This is just a warmup that updates the callers. Change-Id: I78f4f44e2b82f72b3a39fa8a8bdadef1d1b8a99e Reviewed-on: https://skia-review.googlesource.com/18381 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* wait for DM status thread to exit on iOSGravatar Mike Klein2017-05-26
| | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug,Test-iOS-Clang-iPhone6-GPU-GX6450-arm64-Debug,Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Debug Change-Id: I0e7491a6aaad08e969ceaabae49cbda718ea4be8 Reviewed-on: https://skia-review.googlesource.com/18065 Reviewed-by: Stephan Altmueller <stephana@google.com>
* Tag CodecSrc bitmaps with standard color spacesGravatar Matt Sarett2017-05-26
| | | | | | | | | | | | | Tests were previously dependent on the fact that drawBitmap calls were using the legacy sprite blitters. Now these tests are blocking the change that fixes drawBitmap behavior. https://skia-review.googlesource.com/c/17923/ Bug: skia: Change-Id: Ia9e5244243f18680d7593b0fa9de942dbbeeeb1d Reviewed-on: https://skia-review.googlesource.com/18027 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* SkRasterPipeline in SkArenaAllocGravatar Mike Klein2017-05-24
| | | | | | | | | Bug: skia:6673 Change-Id: Ia2bae4f6a9039a007a10b6b45bcf2f0854bf6e5c Reviewed-on: https://skia-review.googlesource.com/17794 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Premultiply in DM before drawing unpremul f16Gravatar Leon Scroggins III2017-05-24
| | | | | | | | | We special case N32, but need to also handle f16 Change-Id: I0d6061d55e55c5952c740255e4600366d8d77919 Reviewed-on: https://skia-review.googlesource.com/17786 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add animation support to SkWebpCodecGravatar Leon Scroggins III2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TBR=reed@google.com (No change to the public API, but changed a header file) SkWebpCodec: - Implement onGetFrameCount, onGetFrameInfo, and onGetRepetitionCount - Respect the alpha reported by libwebp. Although the spec states that it is only a hint, the libwebp encoder uses it properly. Respecting allows us to draw opaque images faster and decode them to 565. This also matches other SkCodecs (and Chromium). - onGetPixels: - Decode the frame requested, recursively decoding required frame if necessary - When blending with a prior frame, use SkRasterPipeline SkCodec: - Move check for negative index to getFrameInfo - Reset the colorXform if one is not needed SkCodecAnimation: - Add new blend enum, for WebP's (and APNG's) non-blending option SkFrameHolder: - New base classes for frames and the owner of the frames, allowing code sharing between SkWebpCodec and SkGifCodec (particularly for determining whether a frame has alpha and what frame it depends on) - When moving items from SkGIFFrameContext, use Skia conventions (i.e. int instead of unsigned) - Rename "delay time" to "duration", to match e.g. SkFrameInfo:: fDuration SkGifImageReader: - Move pieces to SkFrameHolder, and adapt to changes made in the process - Make setAlphaAndRequiredFrame (now on the base class SkFrameHolder) more general to support webp, and add support for frames that do not blend - Change SkGIFFrameContext from a struct to a class, to match how we use the distinction elsewhere (i.e. struct is a small object with public fields) - Rework hasTransparentPixel (now hasTransparency, since it returns true in some cases where there is not a transparent pixel) to better fit with the modified setAlphaAndRequiredFrame. Also be more consistent when there is no transparent pixel but no color map. - Simplify an if condition that was previously simplified in 2d61e717 but accidentally got reverted in a4db9be6 CodecAnimTest: - Test new animated webp files - Rearrange the test to more cleanly print alpha type mismatches for the first frame resources: - webp-animated.webp - animated webp from Chromium - blendBG.webp - new webp file using bits of webp-animated-semitransparent4.webp from Chromium - tests required frame and alpha when using the non-blending mode - frames have the following properties: - Frame 0: no alpha, fills screen - Frame 1: alpha, fills screen - Frame 2: no alpha, fills screen - Frame 3: alpha, fills screen, blendBG - Frame 4: no alpha, fills screen, blendBG - Frame 5: alpha, blendBG - Frame 6: covers 4, has alpha, blendBG - also used to test decoding to 565 if the new frame data has alpha but blends onto an opaque frame DM.cpp: - Test animated images to non-native 8888 and unpremul DMSrcSink.cpp: - Do not test non-native 8888 decodes to f16 dst - Test unpremul decodes to f16 - Copy a frame of an animated image prior to drawing, since in unpremul mode, the DM code will premultiply first. Bug: skia: 3315 Change-Id: I4e55ae2ee5bc095b37a743bdcfac644be603b980 Reviewed-on: https://skia-review.googlesource.com/16707 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Improve test coverage of image decode modesGravatar Matt Sarett2017-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the new world... --image CodecSrc and ImageGenSrc tests run on: (1) 8888 with kIgnore transfer fn behavior (2) srgb with kRespect transfer fn behavior (3) f16 AndroidCodecSrc and BRDCodecSrc tests run on: (1) 8888, since SkAndroidCodec always uses kIgnore (2) f16, since android uses f16 --colorImage ColorCodecSrc tests run on: (1) 8888 in kBaseline mode, so we can see what the raw pixels look like (2) srgb in color correct modes (3) f16 in color correct modes Bug: skia: Change-Id: I65d1a04051da6f94bf5e48f7bc610f482870dc75 Reviewed-on: https://skia-review.googlesource.com/17396 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add new SkImageGenerator::getPixels() API, deprecate the oldGravatar Matt Sarett2017-05-12
| | | | | | | | | | | | This is fairly aggressive in that it will break any client that is currently using SkImageGenerator with kIndex8. I'm guessing that we don't have any clients doing that. Bug: skia:6620 Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca Reviewed-on: https://skia-review.googlesource.com/16601 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Tune down libpng in DM.Gravatar Mike Klein2017-05-09
| | | | | | | | | | | | | | Timing `out/dm --src gm --config srgb -w foo` on my desktop, - wall time drops from 3.72 -> 2.17 seconds; and - CPU time drops from 64.9 -> 27.9 seconds. So again, close to 2x speedup. (In exchange, the .pngs of our GMs grow from 57M to 73M.) Change-Id: I6e2e8c8bda6371e857c8db41ca3119402a9056ae Reviewed-on: https://skia-review.googlesource.com/16000 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Revert "Delete copyTo(Allocator), hide copyTo() behind flag""Gravatar Matt Sarett2017-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0122af08f6af0dee490e1a4f35b552377d0d4753. Reason for revert: Fixed Android callsite Original change's description: > Revert "Delete copyTo(Allocator), hide copyTo() behind flag" > > This reverts commit d4a338f4d0a0cdc08d7d3668931c60997f0fa971. > > Reason for revert: Looks like I missed something I was supposed to delete in Android. > > Original change's description: > > Delete copyTo(Allocator), hide copyTo() behind flag > > > > Replace uses of copyTo() in Skia. > > > > Bug: skia:6464 > > Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548 > > Reviewed-on: https://skia-review.googlesource.com/14502 > > Commit-Queue: Matt Sarett <msarett@google.com> > > Reviewed-by: Mike Reed <reed@google.com> > > > > TBR=msarett@google.com,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e > Reviewed-on: https://skia-review.googlesource.com/14602 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,reviews@skia.org,reed@google.com Change-Id: I81659a820f79f1958fda23cb62513065b57db99d Reviewed-on: https://skia-review.googlesource.com/14640 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Delete copyTo(Allocator), hide copyTo() behind flag"Gravatar Matt Sarett2017-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4a338f4d0a0cdc08d7d3668931c60997f0fa971. Reason for revert: Looks like I missed something I was supposed to delete in Android. Original change's description: > Delete copyTo(Allocator), hide copyTo() behind flag > > Replace uses of copyTo() in Skia. > > Bug: skia:6464 > Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548 > Reviewed-on: https://skia-review.googlesource.com/14502 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e Reviewed-on: https://skia-review.googlesource.com/14602 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Delete copyTo(Allocator), hide copyTo() behind flagGravatar Matt Sarett2017-04-27
| | | | | | | | | | Replace uses of copyTo() in Skia. Bug: skia:6464 Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548 Reviewed-on: https://skia-review.googlesource.com/14502 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Hardwire opList lookAhead & lookBack parametersGravatar Robert Phillips2017-04-26
| | | | | | | | | | If/when we double check these settings we can either re-add these parameters or change the code manually. The driving goal here is to shrink GrRenderTargetOpList. Change-Id: I7819de18f97e8282e8754e3438130f797ebb3c37 Reviewed-on: https://skia-review.googlesource.com/14381 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Switch SkCodec to int for counts and indicesGravatar Leon Scroggins III2017-04-17
| | | | | | | | | | | | This matches other Skia APIs. size_t was adopted from blink/ GIFImageReader. Change-Id: Ic83e59f0942f597c4fb834e623acd9886ad483fe Reviewed-on: https://skia-review.googlesource.com/13274 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Chris Blume <cblume@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>