aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* SkPDF: fall back on paths for unembeddable fonts.Gravatar halcanary2015-10-12
| | | | | | | | Add GM, SkPDFFont::CanEmbedTypeface BUG=skia:3866 Review URL: https://codereview.chromium.org/1401763002
* add applyFilter() to SkImageGravatar reed2015-10-12
| | | | | | | | | | | | | | | 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
* change more effects to only expose factoriesGravatar reed2015-10-12
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1395403002
* Remove SK_SUPPORT_LEGACY_GRADIENT_DITHERING from Skia properGravatar fmalita2015-10-12
| | | | | | | | | | | | Migrating the flag to embedder defines (Chromium already guarded). Also augment gradient-focused GMs to generate both dithered/undithered results. BUG=skia:4436 R=reed@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/1400813006
* Remove image usage type enum. Use GrTextureParams instead.Gravatar bsalomon2015-10-12
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1404433002
* SkPDF: Optionally output PDF/A-2b archive format.Gravatar halcanary2015-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: this format does not yet pass validation tests. Add skia_pdf_generate_pdfa GYP flag. Default to off for now. PDF/A files are not reproducable, so they make correctness testing harder. Turn the Metadata struct into te SkPDFMetadata struct. This splits out a lot of functionality around both kinds of metadata. When PDF/A is used, add an ID entry to the trailer. Add SkPDFObjNumMap::addObjectRecursively. Test with GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp ninja -C out/Release dm out/Release/dm --config pdf --src skp gm -w /tmp/dm With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and SKPs are identical. With skia_pdf_generate_pdfa=1, all PDFs generated from GMs and SKPs render identically in Pdfium. BUG=skia:3110 Review URL: https://codereview.chromium.org/1394263003
* [TextBlob] Fall back to TightRunBounds when the font bounds are emptyGravatar fmalita2015-10-09
| | | | | | | | | | | | | | Empty font bounds are likely an indication of a font bug. As a best effort, we can use TightRunBounds in this easily detectable case. Since TightRunBounds only supports kDefault_Positioning currently, the CL also reinstates handling of kFull_Positioning and kHorizontal_Positioning (removed in http://crrev.com/858153007). BUG=507022 R=reed@google.com,bungeman@google.com Review URL: https://codereview.chromium.org/1399123002
* Fix SkWindow.cpp includes for non-gpu modeGravatar Brian Salomon2015-10-09
| | | | | | TBR=bungeman@google.com Review URL: https://codereview.chromium.org/1400933002 .
* Revert of SkPDF: Optionally output PDF/A-2b archive format. (patchset #5 ↵Gravatar bungeman2015-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/1394263003/ ) Reason for revert: SkMD5 is not really part of the Skia library. This is breaking the roll by using it, since Chromium doesn't build it. Original issue's description: > SkPDF: Optionally output PDF/A-2b archive format. > > Note: this format does not yet pass validation tests. > > Add skia_pdf_generate_pdfa GYP flag. Default to off for now. > PDF/A files are not reproducable, so they make correctness > testing harder. > > Turn the Metadata struct into te SkPDFMetadata struct. This > splits out a lot of functionality around both kinds of metadata. > > When PDF/A is used, add an ID entry to the trailer. > > Add SkPDFObjNumMap::addObjectRecursively. > > Test with > > GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp > ninja -C out/Release dm > out/Release/dm --config pdf --src skp gm -w /tmp/dm > > With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and > SKPs are identical. With skia_pdf_generate_pdfa=1, all PDFs > generated from GMs and SKPs render identically in Pdfium. > > BUG=skia:3110 > > Committed: https://skia.googlesource.com/skia/+/939c0fe51f157104758bcb268643c8b6d317a530 TBR=tomhudson@google.com,halcanary@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3110 Review URL: https://codereview.chromium.org/1398193002
* Move functions from SkGr to SkGrPriv.hGravatar bsalomon2015-10-09
| | | | Review URL: https://codereview.chromium.org/1397123002
* SkPDF: Optionally output PDF/A-2b archive format.Gravatar halcanary2015-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: this format does not yet pass validation tests. Add skia_pdf_generate_pdfa GYP flag. Default to off for now. PDF/A files are not reproducable, so they make correctness testing harder. Turn the Metadata struct into te SkPDFMetadata struct. This splits out a lot of functionality around both kinds of metadata. When PDF/A is used, add an ID entry to the trailer. Add SkPDFObjNumMap::addObjectRecursively. Test with GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp ninja -C out/Release dm out/Release/dm --config pdf --src skp gm -w /tmp/dm With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and SKPs are identical. With skia_pdf_generate_pdfa=1, all PDFs generated from GMs and SKPs render identically in Pdfium. BUG=skia:3110 Review URL: https://codereview.chromium.org/1394263003
* Fill incomplete images in SkCodec parent classGravatar msarett2015-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix gpu drawBitmap to work when BM is A8 and we have a shaderGravatar egdaniel2015-10-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1399763002
* Optional gradient ditheringGravatar fmalita2015-10-09
| | | | | | | | | | | | Update raster gradient impls to observe the paint dithering flag. For now this new behavior is disabled pending internal/external client updates to mitigate diffs. BUG=skia:4436 R=reed@google.com,mtklein@google.com,tomhudson@google.com Review URL: https://codereview.chromium.org/1391303002
* Focus SkScaledCodec on BitmapRegionDecoderGravatar scroggo2015-10-09
| | | | | | | | | | | | | | | | | | | | 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
* remove internalDrawBitmap, as it is no longer shared with any other caller, ↵Gravatar reed2015-10-08
| | | | | | | | and can be folded into onDrawBitmap BUG=skia: Review URL: https://codereview.chromium.org/1391333004
* Updates nvpr text blobs to not store a direct reference to theGravatar cdalton2015-10-08
| | | | | | | | | | | per-glyph GPU path object, but rather store a key for looking it up in the resource cache. This allows the cache to purge glyphs when needed. Also indirectly fixes a memory leak that was introduced with nvpr text blobs. BUG=skia: Review URL: https://codereview.chromium.org/1374853004
* Remove ClipMaskType from GrCMMGravatar bsalomon2015-10-07
| | | | Review URL: https://codereview.chromium.org/1391653002
* Insert clip fragment processor outside GrCMMGravatar bsalomon2015-10-07
| | | | Review URL: https://codereview.chromium.org/1393553002
* Revert "Revert of factories should return baseclass, allowing the impl to ↵Gravatar reed2015-10-06
| | | | | | | | | | | specialize (patchset #4 id:60001 of https://codereview.chromium.org/1390523005/ )" This reverts commit 95376a0dde3cdf414eb97a20cef3af19ed7e0151. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1389083002
* Revert of factories should return baseclass, allowing the impl to specialize ↵Gravatar schenney2015-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* factories should return baseclass, allowing the impl to specializeGravatar reed2015-10-06
| | | | | | | | waiting on https://codereview.chromium.org/1386163002/# to land BUG=skia:4424 Review URL: https://codereview.chromium.org/1390523005
* Allow SkIcoCodec to fail due to conversionGravatar scroggo2015-10-06
| | | | | | | | | | | | | | Even if the client chooses dimensions that were suggested by SkIcoCodec, it is possible for the color conversion to be incorrect, so it can still reach the exit case of kInvalidConversion. For example, when running nanobench, we attempt to decode the image to Alpha_8, which the codec does not support. This allows running nanobench in debug mode without asserting. BUG=skia:3418 Review URL: https://codereview.chromium.org/1389943002
* SkPDF: when drawing stroked path, draw using SVG rules for zero-length segmentsGravatar halcanary2015-10-06
| | | | | | | | | | | | | | | | | | The "zeroPath" and emptystroke GMs capture this issue. This CL changes the following PDF GMs: emptystroke dashing4 lineclosepath dashing3 zeroPath linepath complexclip3_complex complexclip3_simple roundrects degeneratesegments filltypes strokerect pathfill inverse_paths desk_chalkboard.skp After this change, all PDF GMs look better (closer to 8888). The dashing4, emptystroke, and zeroPath GMs still need a lot of work to make them look right. BUG=538726 Review URL: https://codereview.chromium.org/1374383004
* Bye bye processor data manager.Gravatar bsalomon2015-10-06
| | | | Review URL: https://codereview.chromium.org/1388113002
* Fix SkGifCodec to handle gifs where frameSize != imageSizeGravatar msarett2015-10-06
| | | | | | | | | | | | | | | | | These are quite rare, causing us to miss a few bugs in how we deal with these images. Additionally, there is a behavior change. If the imageSize is not large enough to contain the frame, we will "fix" the image by increasing the image size. SkScaledCodec is still buggy with regard to these gifs. See skbug.com/4421. We will fix that after 1332053002 lands. BUG=skia: Review URL: https://codereview.chromium.org/1386973002
* Dynamically allocate the GrDrawContextsGravatar robertphillips2015-10-06
| | | | | | This CL moves the allocation and storage of the GrTextContexts into the DrawingManager. The GrDrawContexts now just get their GrTextContext from the DrawingManager. Review URL: https://codereview.chromium.org/1375153007
* [SkDebugger] Handle path empty-bounds gracefullyGravatar fmalita2015-10-06
| | | | | | | | | Paths with empty bounds crash the debugger: mapping their bounds onto the shapshot area gets the canvas into an unhappy state. R=robertphillips@google.com Review URL: https://codereview.chromium.org/1387173003
* Revert of Stop using SkScalerContext::getAdvance() in SkGlyphCache. ↵Gravatar mtklein2015-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/1321243004/ ) Reason for revert: Suspect this is the cause of regressions in crbug.com/527445. It's triggering on Windows and Linux, where getting advances does less than getting full metrics. It's not triggering on Mac, where this CL was a no-op. Original issue's description: > Stop using SkScalerContext::getAdvance() in SkGlyphCache. > > We think it'll simplify things to just always get the full metrics. > On most platforms, it's no different, and we think the platforms that > do differ (FreeType) will be nearly just as cheap. > > Removing this distinction helps us make SkGlyphCaches concurrent by > removing a state (we-have-only-advances) from its logical state machine. > > We see no significant changes running SKPs before and after this CL. > That makes sense, of course, because the SKPs bake some of this into drawPosText. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/518a2923f11b819fa44ed5cff54155326959540f TBR=reed@google.com,bungeman@google.com,herb@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1383403003
* Make path range loading explicitGravatar cdalton2015-10-05
| | | | | | | | | | Requires the caller to explicitly preload paths within a range before calling drawPaths. This allows us to remove the implicit lazy load, thereby eliminating a redundant check on every redraw of a text blob. BUG=skia: Review URL: https://codereview.chromium.org/1382013002
* Implement cached nvpr text blobsGravatar cdalton2015-10-05
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1381073002
* Use SkTextBlob for nvpr color bitmap fallbacksGravatar cdalton2015-10-05
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1381873003
* Add TextRun object to nvpr textGravatar cdalton2015-10-05
| | | | | | | | | Adds a TextRun object that defines a resolution-independent, paint- indepent draw for a string of nvpr text. BUG=skia: Review URL: https://codereview.chromium.org/1375353004
* SkScaledCodec should implement onRewind()Gravatar msarett2015-10-05
| | | | | | | | This is a bug fix. I'm also adding a test. BUG=skia: Review URL: https://codereview.chromium.org/1385703002
* Validate text blob runs after SkTextBlob construction.Gravatar fmalita2015-10-05
| | | | | | | | | This avoids tripping CFI when casting uninitialized SkTextBlob ptrs. BUG=chromium:538754 R=bungeman@google.com,reed@google.com,krasin@google.com Review URL: https://codereview.chromium.org/1388543005
* Fix gpu dashing for case where all intervals are 0.Gravatar egdaniel2015-10-05
| | | | | | BUG=skia:4409 Review URL: https://codereview.chromium.org/1381803005
* Force cache SkTestScalerContext path bounds.Gravatar mtklein2015-10-05
| | | | | | | | | | Looks like a race on this: http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/2608/steps/dm/logs/stdio BUG=skia: Review URL: https://codereview.chromium.org/1373363007
* Revert of Have GrRectBlurEffect use Linear filtering (rather than Nearest ↵Gravatar robertphillips2015-10-04
| | | | | | | | | | | | | | | | | | | | | Neighbor) (patchset #2 id:20001 of https://codereview.chromium.org/1378023004/ ) Reason for revert: Trial run confirmed layout test expectations - will reland after suppressions Original issue's description: > Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor) > > Committed: https://skia.googlesource.com/skia/+/2d70bcccc9ba8f3898a7ae506ba7410ed8e9c9db > > Committed: https://skia.googlesource.com/skia/+/5175b9563055926b4969d57f06e4ae49b86e055b TBR=bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1378813004
* SkImage doesn't use props, so don't need to store itGravatar reed2015-10-04
| | | | | | | BUG=skia: TBR=bsalomon Review URL: https://codereview.chromium.org/1372153006
* Fix memory leak in ClipMaskManagerGravatar robertphillips2015-10-04
| | | | | | TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1385823002
* Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor)Gravatar robertphillips2015-10-04
| | | | | | Committed: https://skia.googlesource.com/skia/+/2d70bcccc9ba8f3898a7ae506ba7410ed8e9c9db Review URL: https://codereview.chromium.org/1378023004
* Simplify nvpr textGravatar cdalton2015-10-03
| | | | | | | | | | | | | | | | | - Drops device-space glyphs in favor of perf/simplicity. - Removes residual complexities that would flip glyphs vertically for compatibility with nvpr glyph loading, which is no longer used. - Drops hairline support since they required new paths for every draw matrix, and could only be supported under certain circumstances. - Quits checking for color bitmap fonts in canDrawText since the normal color emoji fallback will handle them anyway. BUG=skia: Review URL: https://codereview.chromium.org/1380973002
* Stop calling jpeg_finish_decompress()Gravatar msarett2015-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | jpeg_finish_decompress() does several things: (1) Reads to the end of the image stream. (2) Calls term_src(), a client provided function that indicates we are done with the memory stream. Our current implementation of term_src() does nothing. (3) Calls jpeg_abort() which aborts the decode and cleans up some memory. I don't think we need to call this anymore. (1) seems irrelevant. It seems a little dangerous to get rid of (2), but it is fine while our implementation of term_src() does nothing. (3) We will call jpeg_destroy() on destruction of the JpegDecoderManager. This should free all the memory, making it unnecessary to call jpeg_abort() beforehand. BUG=skia:4040 Review URL: https://codereview.chromium.org/1370323004
* Move all knowledge of X sampling into SkScaledCodecGravatar scroggo2015-10-02
| | | | | | | | | | | | | | | | | | | | | | | Prior to this CL, each SkCodec subclass that allows sampling does an extra check in onStartScanlineDecode to determine whether the X dimension is supported for sampling. Remove this check, and provide a way for SkScaledCodec to directly access the SkSwizzler, and update it to do sampling. This way, the SkCodec knows nothing of sampling, but we can still save the extra step of sampling afterwards. FIXME: SkBmpRLECodec still calls SkScaledCodec::DimensionsSupported. It seems like it could directly support sampling, rather than dealing with SkScaledCodec (partially). Add a new base class for SkSwizzler. It allows updating the swizzler after it was created, which is done by SkScaledCodec. Modify SkSwizzler's constructor/factory function to stop taking any info about sampling, assume the sample size is one, and move modifying that into a virtual function overridden from the base class. BUG=skia:4284 Review URL: https://codereview.chromium.org/1372973002
* Incrementally flush GrDrawTargetGravatar joshualitt2015-10-02
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/a7e878064509ef96b54d5507dab0b50def66dc13 Review URL: https://codereview.chromium.org/1386463004
* Revert of Incrementally flush GrDrawTarget (patchset #8 id:130001 of ↵Gravatar joshualitt2015-10-02
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1386463004/ ) Reason for revert: breaking bots Original issue's description: > Incrementally flush GrDrawTarget > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/a7e878064509ef96b54d5507dab0b50def66dc13 TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1386683002
* Some iOS fixes to make SampleApp work better.Gravatar jvanverth2015-10-02
| | | | | | | | | | Changes: - Rebuild argc and argv so we can process command line arguments - Remove unnecessary SimpleiOSApp files - Add support for reading files from the app bundle - Add gpu flag so we can start up directly into OpenGL Review URL: https://codereview.chromium.org/1382943004
* Incrementally flush GrDrawTargetGravatar joshualitt2015-10-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1386463004
* Add work around for devices/API filters that claim GL_KHR_debug support but ↵Gravatar bsalomon2015-10-02
| | | | | | don't provide functions Review URL: https://codereview.chromium.org/1383763004
* Remove separate cache for clip mask texturesGravatar bsalomon2015-10-02
| | | | Review URL: https://codereview.chromium.org/1377943003