aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFDevice.cpp
Commit message (Collapse)AuthorAge
* s/SkAutoTUnref/sk_sp/ in src/ part 1Gravatar Hal Canary2016-11-07
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4480 Change-Id: I7d3219b02ad5094785e1b7635a9482e69aadbc8c Reviewed-on: https://skia-review.googlesource.com/4480 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAMGravatar Mike Reed2016-11-03
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4384 Change-Id: I5121acd027d935ade169ff65941f29f654a47bd0 Reviewed-on: https://skia-review.googlesource.com/4384 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkPDF: Always individually position glyphs in Windows.Gravatar Hal Canary2016-11-01
| | | | | | | | | | | Confirmed to fix BUG=chromium:659604 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4202 Change-Id: Ied25284e285ee51ee1a4712b7e17d752f50d88d2 Reviewed-on: https://skia-review.googlesource.com/4202 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* remove xfermode from public apiGravatar Mike Reed2016-10-28
| | | | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4020 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac Reviewed-on: https://skia-review.googlesource.com/4020 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar reed2016-10-05
| | | | | | | | | | | This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002 TBR= Review-Url: https://codereview.chromium.org/2396953002
* Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8. Reason for revert: new assert from 100K bot Original change's description: > Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints" > > - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter > This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 > > Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 > Reviewed-on: https://skia-review.googlesource.com/2992 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff Reviewed-on: https://skia-review.googlesource.com/3023 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 Reviewed-on: https://skia-review.googlesource.com/2992 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a. Reason for revert: failing to deserialize some of the 100K Original change's description: > Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints" > > This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 > > Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a > Reviewed-on: https://skia-review.googlesource.com/2924 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f Reviewed-on: https://skia-review.googlesource.com/2962 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a Reviewed-on: https://skia-review.googlesource.com/2924 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in ↵Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paints""" This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10. legacy (100K) skp failure Original change's description: > Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"" > > This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 > > Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 > Reviewed-on: https://skia-review.googlesource.com/2878 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5 Reviewed-on: https://skia-review.googlesource.com/2881 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 Reviewed-on: https://skia-review.googlesource.com/2878 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Move clip CTM application to SkRasterClip and SkClipStackGravatar Brian Salomon2016-10-03
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2866 Change-Id: I914a57d6ba128acc457e12586c99ba6766eb940c Reviewed-on: https://skia-review.googlesource.com/2866 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135. Reason for revert: <INSERT REASONING HERE> Original change's description: > replace SkXfermode obj with SkBlendMode enum in paints > > BUG=skia:5814 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 > > Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 > Reviewed-on: https://skia-review.googlesource.com/2714 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7 Reviewed-on: https://skia-review.googlesource.com/2871 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* replace SkXfermode obj with SkBlendMode enum in paintsGravatar Mike Reed2016-10-03
| | | | | | | | | | | | BUG=skia:5814 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 Reviewed-on: https://skia-review.googlesource.com/2714 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkPDF: de-duplicate text-as-pathsGravatar Hal Canary2016-09-30
| | | | | | | | | | | TBR= GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2851 Change-Id: I0accbca13945587cd5ef903cbd4127f1f6a3fb13 Reviewed-on: https://skia-review.googlesource.com/2851 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPDF: subset drawImageRect while still dedupingGravatar Hal Canary2016-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | - Replace SkImageBitmap with SkImageSubset - SkBitmapKey becomes trivial for simplicity. - SkPDFCanvas::onDraw(Bitmap|Image)Rect now clip and call SkCanvas::onDraw(Bitmap|Image)Rect. - SkPDFDevice::draw(Bitmap|BitmapRect|Sprite) now convert bitmap into SkImageSubset via make_image_subset function. - SkPDFDevice::draw(Image|Bitmap)Rect now implemented again. - SkPDFDevice::internalDrawImage now performs image subsetting as needed, while still deduping properly. BUG=633528 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2785 Change-Id: I063346d12b0e9c6b6c0c4943ee25400c88aa1a44 Reviewed-on: https://skia-review.googlesource.com/2785 Reviewed-by: Ben Wagner <bungeman@google.com>
* Add output format properties to SkImageFilter::ContextGravatar brianosman2016-09-22
| | | | | | | | | | | | | For now, this is just the color space (of the original requesting device). This is used when constructing intermediate rendering surfaces, so that we ensure we land in a surface that's similar/compatible to the final consumer of the DAG's output. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357273002 Review-Url: https://codereview.chromium.org/2357273002
* Add a transient image filter cache to SkImage::makeWithFilter & PDFGravatar brianosman2016-09-21
| | | | | | | | | | | Added a bench for makeWithFilter (~23 ms -> ~6 ms median locally). Also fixed indentation. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360663002 Review-Url: https://codereview.chromium.org/2360663002
* abstract name of clipping ops, to transtion to a more restricted setGravatar reed2016-09-20
| | | | | | | | | | | SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp pre-CL needed in chrome : https://codereview.chromium.org/2355583002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002 Review-Url: https://codereview.chromium.org/2355483002
* SkPDF: Implement /ActualText to make text extraction correct.Gravatar halcanary2016-09-16
| | | | | | | | | | | | | For old API: no change. For new API: LTR text is perfectly extracted, RTL needs better testing. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot BUG=skia:5434 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322403002 Review-Url: https://codereview.chromium.org/2322403002
* Revert of SkPDF: Implement /ActualText to make text extraction correct. ↵Gravatar halcanary2016-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #11 id:220001 of https://codereview.chromium.org/2322403002/ ) Reason for revert: MSAN, ASAN errors Original issue's description: > SkPDF: Implement /ActualText to make text extraction correct. > > For old API: no change. > > For new API: LTR text is perfectly extracted, RTL needs better testing. > > BUG=skia:5434 > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322403002 > > Committed: https://skia.googlesource.com/skia/+/dbd16345a5b2b824f2696af791bb0f01304cf549 TBR=tomhudson@google.com,bungeman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5434 Review-Url: https://codereview.chromium.org/2338213008
* SkPDF: Implement /ActualText to make text extraction correct.Gravatar halcanary2016-09-16
| | | | | | | | | | | For old API: no change. For new API: LTR text is perfectly extracted, RTL needs better testing. BUG=skia:5434 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322403002 Review-Url: https://codereview.chromium.org/2322403002
* SkPDF: fix unembeddable text drawn with positioning (broken in 6059dc3)Gravatar halcanary2016-09-16
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347183002 Review-Url: https://codereview.chromium.org/2347183002
* SkPDF: refactor & code cleanup ahead of https://crrev.com/2322403002Gravatar halcanary2016-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | SkPDFDevice::GraphicStateEntry: remove unnecessary fFont and fTextSize. SkPDFDevice::updateFont(): replace with update_font() and inlined code. De-duplicate this block of code. SkPDFResourceDict::GetResourceTypePrefix function made public: removes need for temporary SkString returned by SkPDFResourceDict::getResourceName() GlyphPositioner: delay writing intial matrix until first glyph. Assert that widechars is a constant. SkPDFFont::FontType(): make public so that PDFDevice can know about multibyte status. SkPDFFont::countStretch() removed, and the stretch loop flattened. *no changes in PDF output* BUG=skia:5434 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2327953002 Review-Url: https://codereview.chromium.org/2327953002
* SkPDF: implement drawTextBlob()Gravatar halcanary2016-09-09
| | | | | | | | | | | | | | Pass new fields from https://skia.googlesource.com/skia/+/4f0a23a into SkPDFDevice::internalDrawText() (a later CL will use them for /ActualText. No change in PDF output. BUG=skia:5434 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300393002 Review-Url: https://codereview.chromium.org/2300393002
* SkPDF: remove unused fallback clipping codeGravatar halcanary2016-09-07
| | | | | | | | | This code is untested and unnecessary. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319653002 Review-Url: https://codereview.chromium.org/2319653002
* SkMakeUnique.h defines skstd::make_unique<T>(Args...)Gravatar halcanary2016-09-02
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2293963002 Review-Url: https://codereview.chromium.org/2293963002
* SkPDF: Glyph validation changeGravatar halcanary2016-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of mapping invaid glyphIDs to zero or maxGlyphID, don't draw them at all. Validate glyphs when glyph is written, not ahead of time. Don't allocate array to copy user-provided glyphs. Easy early exit from SkPDFDevice::internalDrawText() GlyphPositioner::flush() called ~GlyphPositioner() SkScopeExit class now exists. Assume SkTypeface* pointers are now never null in more places. precalculate alignmentFactor to clean up code. SkPDFDevice::updateFont must be called with validated glyphID. Skip bad glyphs to make this true. SkPDFDevice::updateFont always succeeds. SkPDFFont::GetFontResource always succeeds (preconditions are asserted). If GetMetrics fails, don't call GetFontResource. SkPDFFont::glyphsToPDFFontEncodingCount() becomes SkPDFFont::countStretch() and is inlined. SkPDFFont::glyphsToPDFFontEncoding now works one Glyph at a time and is inlined. SkPDFFont::noteGlyphUsage() operates one glyph at a time. Add SkScopeExit.h; also a unit test for it. SkPostConfig: Fix SK_UNUSED for Win32. No public API changes. TBR=reed@google.com BUG=625995 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278703002 Review-Url: https://codereview.chromium.org/2278703002
* SkPDF: vector canvases can't hint!Gravatar halcanary2016-08-24
| | | | | | | BUG=637571 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273073002 Review-Url: https://codereview.chromium.org/2273073002
* SkPDF: vertical writing: draw nothingGravatar halcanary2016-08-24
| | | | | | | BUG=skia:5665 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274153002 Review-Url: https://codereview.chromium.org/2274153002
* SkPDF: PDFDevice cleanup.Gravatar halcanary2016-08-23
| | | | | | | | | | | | | Remove unused fContentSize. Combine SkPDFDevice::writeContent and SkPDFDevice::content. Remove unused SkPDFDevice::initialTransform(). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264113003 Review-Url: https://codereview.chromium.org/2264113003
* store info in basedevice, change getter to non-virtual const&Gravatar reed2016-08-20
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261003003 Review-Url: https://codereview.chromium.org/2261003003
* SkPDF: in-place font subsettingGravatar halcanary2016-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: gross code simplification, also no bitset lookups at draw time. SkPDFFont owns its glyph useage bitset. SkPDFSubstituteMap goes away. SkPDFObject interface is simplified. SkPDFDocument tracks font usage (as hash set), not glyph usage. SkPDFFont gets a simpler constructor. SkPDFFont has first and last glyph set in constructor, not adjusted later. SkPDFFont implementations are simplified. SkPDFGlyphSet is replaced with simple SkBitSet. SkPDFFont sizes its SkBitSets based on glyph count. SkPDFGlyphSetMap goes away. SkBitSet is now non-copyable. SkBitSet now how utility methods to match old SkPDFGlyphSet. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253283004 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-GDI-Trybot,Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-GDI-Trybot Review-Url: https://codereview.chromium.org/2253283004
* SkPDF: unify drawText and drawPosTextGravatar halcanary2016-08-15
| | | | | | | | | | | | | Motivation: a later CL will add drawTextBlob() (after https://crrev.com/2084533004 lands). This CL is designed with that change in mind. Also fewer redundant lines of code. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241683005 Committed: https://skia.googlesource.com/skia/+/6059dc32fe36358175cb81541c91e74a2a7e771a Review-Url: https://codereview.chromium.org/2241683005
* Revert of SkPDF: unify drawText and drawPosText (patchset #2 id:40001 of ↵Gravatar robertphillips2016-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2241683005/ ) Reason for revert: I believe this is breaking the Google3 roll Original issue's description: > SkPDF: unify drawText and drawPosText > > Motivation: a later CL will add drawTextBlob() (after > https://crrev.com/2084533004 lands). This CL is designed > with that change in mind. Also fewer redundant lines of > code. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241683005 > > Committed: https://skia.googlesource.com/skia/+/6059dc32fe36358175cb81541c91e74a2a7e771a TBR=bungeman@google.com,halcanary@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2248923002
* SkPDF: unify drawText and drawPosTextGravatar halcanary2016-08-15
| | | | | | | | | | | | Motivation: a later CL will add drawTextBlob() (after https://crrev.com/2084533004 lands). This CL is designed with that change in mind. Also fewer redundant lines of code. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241683005 Review-Url: https://codereview.chromium.org/2241683005
* SkPDF: Subset Type3 (fallback) fontGravatar halcanary2016-08-12
| | | | | | | | | | | | | | | | | | | Motivation: significant file-size reduction. Also: SkPDFFont::subsetFont() returns a sk_sp<SkPDFObject> rather than a SkPDFFont*. SkPDFType3Font constructor no longer populates font info; relies on subsetting. SkPDFFont::Create is easier to read Also: SkPDFType3Font are scaled by emSize rather than 1000. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231483002 Committed: https://skia.googlesource.com/skia/+/88b138da99328b04cae9a8ee19c3882b8847a550 Review-Url: https://codereview.chromium.org/2231483002
* SkPDF: Stop using kHAdvance_PerGlyphInfoGravatar halcanary2016-08-05
| | | | | | | | | | | | | | | SkPDFFont: - never request kHAdvance_PerGlyphInfo from typeface. - set_glyph_widths() fn uses a glyph cache to get advances. - stop expecting vertical advances that are never requested. - composeAdvanceData() now non-templated - appendAdvance() one-line function removed SkPDFDevice: - use a glyph cache for getting repeated advances. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2219733004 Review-Url: https://codereview.chromium.org/2219733004
* SkPDF: PDFShader code modernized.Gravatar halcanary2016-08-03
| | | | | | | | | | | | | | | | | | | | | | Motivation: reduce code complexity. SkCanon stores SkPDFShader::State next to SkDFObject, not inside. many places use sk_sp<T> rather than T* to represent ownership. SkPDFShader::State no longer holds bitmap. SkPDFShader::State gets move constructor, no longer heap-allocated. Classes removed: SkPDFFunctionShader SkPDFAlphaFunctionShader SkPDFImageShader BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193973002 Review-Url: https://codereview.chromium.org/2193973002
* SkPDF: PDFStream has-a not is-a PDFDictGravatar halcanary2016-07-29
| | | | | | | | | | | | | | | Motivation: SkPDFStream and SkPDFSharedStream now work the same. Also: - move SkPDFStream into SkPDFTypes (it's a fundamental PDF type). - minor refactor of SkPDFSharedStream - SkPDFSharedStream takes unique_ptr to represent ownership BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190883003 Review-Url: https://codereview.chromium.org/2190883003
* SkPDF: flip saveLayer rightside upGravatar halcanary2016-07-29
| | | | | | | | | | Broken in https://skia.googlesource.com/skia/+/4b1e17e BUG=632574 TBR=tomhudson@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197623002 Review-Url: https://codereview.chromium.org/2197623002
* SkPDF: drawText makes use of SkPaint.measureText() for alignment.Gravatar halcanary2016-07-28
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188303003 Review-Url: https://codereview.chromium.org/2188303003
* SkPdf: SkPDFFormXObject de-class-ified.Gravatar halcanary2016-07-27
| | | | | | | | | | | | | | We don't need an object, just a few standard fields on the base class; the change lets us get rid of a bunch of boilerplate code. I think this also reduces the cognitive load of the SkPDF internals. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185803003 Review-Url: https://codereview.chromium.org/2185803003
* remove fClipStack and attach/deattach-from-canvasGravatar reed2016-07-25
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180793002 Review-Url: https://codereview.chromium.org/2180793002
* Deprecate SkDevice::accessBitmap methodGravatar robertphillips2016-07-21
| | | | | | | | | | Relies on https://codereview.chromium.org/2162423003/ (Add SK_SUPPORT_LEGACY_ACCESSBITMAP Skia guard) landing in Chromium first. Calved off: https://codereview.chromium.org/2163323002/ (Add desired width & height to drawContext (as opposed to using the width & height of the RT)) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2168483003 Review-Url: https://codereview.chromium.org/2168483003
* remove dead methods now that we use specials exclusively for imagefiltersGravatar reed2016-07-20
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164763003 Review-Url: https://codereview.chromium.org/2164763003
* use special-image for imagefilters and save/restore layerGravatar reed2016-07-20
| | | | | | | | | | | | | add special virtuals to device, in preparation for using them instead of bitmap for imagefilters BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2155933002 patch from issue 2155933002 at patchset 20001 (http://crrev.com/2155933002#ps20001) use specialimages instead of bitmaps for imagefiltering Review-Url: https://codereview.chromium.org/2155063002
* pre-land special methods on deviceGravatar reed2016-07-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161233002 Review-Url: https://codereview.chromium.org/2161233002
* Make SkFont a bit more useableGravatar robertphillips2016-07-19
| | | | | | | | Split out of https://codereview.chromium.org/2163483002/ (Use SkFont in GrStencilAndCoverTextContext) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163633002 Review-Url: https://codereview.chromium.org/2163633002
* move responsibility for creating raster-device into pdfGravatar reed2016-07-15
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146333004 NOTRY=True win failure seems unrelated Review-Url: https://codereview.chromium.org/2146333004