aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecords.h
Commit message (Collapse)AuthorAge
* skeletal animation support added to API and software backendGravatar Ruiqi Mao2018-06-29
| | | | | | | | | | | | SkCanvas::drawVertices now supports overloads that take an array of bone deformation matrices. SkVertices::MakeCopy and SkVertices::Builder now support two additional optional attributes, boneIndices and boneWeights. Bug: skia: Change-Id: I30a3b11691e7cdb13924907cc1401ff86d127aea Reviewed-on: https://skia-review.googlesource.com/137221 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
* Don't use getDeviceClipBounds() to bound pic ops.Gravatar Mike Klein2018-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The values returned by SkCanvas::getDeviceClipBounds() are in the right space, but have extra constraints on them that are not desirable for bounding the logical bounds of draw operations: - they are integral - they are non-negative We've been intersecting the bounds of each operation with these bounds, which means we're mixing these bogus constraints into the bounds of each recorded operation. This percolates up to the SkPicutre cull rect too. The most egregious way to see the problem is to record a draw op entirely in negative space... it'll come back with empty logical bounds rather than its correct (negative-space) bounds. I've added a test for this, and another test I also think should be passing but left making it so as a follow up. I've had to disable a couple tests asserting clips affect the bounds. :/ A possible follow-up might go back to using the clips to tighten the bounds of the ops, just so long as we take the original user bounds and map them with the CTM through to device space ourselves, rather than relying on the recording canvas' clip stack. I think this means we'd need to maintain our own stack of device-space float SkRect clip bounds while calculating these op bounds. Bug: skia:7735 Change-Id: I6bf15f6b2a9ba4329a4eeae7f9d57aa8729ec1bb Reviewed-on: https://skia-review.googlesource.com/126002 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Implement a fast path for solid color lattice rectangleGravatar Stan Iliev2017-12-11
| | | | | | | | | | | | Add a flag that hints, which lattice rectangles are solid colors. Draw solid rectangles and 1x1 rectangles with drawRect. Test: Measured performance of a ninepatch drawn by HWUI Bug: b/69796044 Change-Id: Ib3b00ca608da42fa9f2d2038cc126a978421ec7c Reviewed-on: https://skia-review.googlesource.com/79821 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Record SkCanvas::flush().Gravatar Mike Klein2017-08-14
| | | | | | | | | | We can record multiple frames in an .skp by recording SkCanvas::flush(). This should make SkPictures, SkLiteDL, and .skp files all record flush(). Change-Id: I6cf6e0e4ef993530d9f92fa168a53702ffce7d5e Reviewed-on: https://skia-review.googlesource.com/34081 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Compute correct bounds for DrawShadowRec.Gravatar Jim Van Verth2017-07-31
| | | | | | | | Bug: skia:6880 Change-Id: Ia8b94e52eec3feb5104d2351bf7a7e6f99101deb Reviewed-on: https://skia-review.googlesource.com/26370 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* SkPath -> PreCachedPathGravatar Mike Klein2017-05-18
| | | | | | | | | | | SkPath is not threadsafe. Gotta use PreCachedPath. TSAN is showing a race in SkPathRef::genID() to write the fGenerationID. Change-Id: I42d6ecadaa754a3c6796ca465981de430a0abb84 Reviewed-on: https://skia-review.googlesource.com/17279 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* move shadows to device virtualGravatar Mike Reed2017-05-17
| | | | | | | | | | | | | This CL keeps the impl for each device backend in the utils file for simplicity (shared helpers). Future CLs may move into their respective impl as they become more specialized. Bug: skia: Change-Id: I97ce6cdcc5106ebf4c84778f943cc32d0b7613c1 Reviewed-on: https://skia-review.googlesource.com/15893 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* move files out of private, and fix up callers to IWYUGravatar Mike Reed2017-05-16
| | | | | | | | | | Realized that a pending CL needed to add (yet another) private type to SkRecords.h, but w/o this CL I'd be forced to move that header also into private. This change frees us up to not have transitive exposure for types that need to be recorded. Bug: skia: Change-Id: Id79f1c2e44ba85e063c1360cf96c92de6397ca2b Reviewed-on: https://skia-review.googlesource.com/17031 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Move the last headers. Cross your fingers.Gravatar mtklein2015-07-29
| | | | | | | | | | | If this doesn't work, one at a time... BUG=skia:4126 No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/1255373006
* Move non-trivial constructors out-of-line.Gravatar mtklein2015-07-29
| | | | | | | | | | | There is more than one way to skin this SkPathPriv.h cat. These constructors are large enough that they probably shouldn't have been inlined like this anyway. BUG=skia:4126 Review URL: https://codereview.chromium.org/1253963004
* Revert "Move headers with no dependencies."Gravatar Mike Klein2015-07-29
| | | | | | | | | | | This reverts commit 117842223bd13325b6da26110d80e0590c1a742b. No good: https://uberchromegw.corp.google.com/i/client.skia/builders/Mac%20Builder/builds/3465/steps/compile/logs/stdio BUG=skia:4126 Review URL: https://codereview.chromium.org/1262173002 .
* Move headers with no dependencies.Gravatar mtklein2015-07-29
| | | | | | | | | | | | | | | C.f. https://codereview.chromium.org/1261013003/ BUG=skia:4126 Will follow up with two more CLs if this works: - one moving SkRecords.h - one moving SkMiniRecorder.h No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/1266593002
* Revert "Move the rest of src headers used by include to include/private."Gravatar Mike Klein2015-07-28
| | | | | | | | | | | | This reverts commit d12e6ffa5cc1c1af47bf73c7c127d8d7f7443058. Our Chrome roll canaries are failing with the dreaded Ninja-says-there's-more-work-to-do message. I will break this up smaller (if possible) and try again tomorrow. BUG=skia:4126 Review URL: https://codereview.chromium.org/1258293004 .
* Move the rest of src headers used by include to include/private.Gravatar mtklein2015-07-28
| | | | | | | | | | | | | $ git grep "../../src/" | grep include now returns nothing. BUG=skia:4126 No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/1261013003
* add src-rect-constraint to drawImageRectGravatar reed2015-07-14
| | | | | | | | | | | Follow-on work - unify around SrcRectConstraint (i.e. drawBitmapRect) - remove silly drawBitmapRectToRect alias - clean-up (possibly remove) alias problems around drawBitmapRect + IRect parameter BUG=skia: Review URL: https://codereview.chromium.org/1228083004
* add matrix options to drawDrawableGravatar reed2015-07-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1224783002
* Add support for drawBitmapRect() to SkMiniRecorder.Gravatar mtklein2015-07-01
| | | | | | BUG=chromium:503705 Review URL: https://codereview.chromium.org/1220733006
* Revert "Move headers used by headers in include/ to include/private."Gravatar Mike Klein2015-07-01
| | | | | | | | This reverts commit 928e16565f3e69cd6661e9ad300ac17e3f33c0c8. BUG=skia: Review URL: https://codereview.chromium.org/1213093004.
* Move headers used by headers in include/ to include/private.Gravatar mtklein2015-07-01
| | | | | | | | | | | Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h used by (public) SkPictureRecorder.h. BUG=skia: Committed: https://skia.googlesource.com/skia/+/a89f55198bdc58f0b6f6196907ab25a6afc1a661 Review URL: https://codereview.chromium.org/1217293004
* Revert "Move headers used by headers in include/ to include/private."Gravatar jvanverth2015-07-01
| | | | | | | | | | | | | This reverts commit a89f55198bdc58f0b6f6196907ab25a6afc1a661. Reason: breaking the roll. TBR=mtklein@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1216033008
* Move headers used by headers in include/ to include/private.Gravatar mtklein2015-07-01
| | | | | | | | | Some of this is transitive, like SkRecords.h used by SkMiniRecorder.h used by (public) SkPictureRecorder.h. BUG=skia: Review URL: https://codereview.chromium.org/1217293004
* Pass arguments to SkRecords structs by const&.Gravatar mtklein2015-06-30
| | | | | | | | | | | | | | This has the effect of using delay_copy() on every argument, obviating the need for delay_copy() and, crucially, having to remember to call delay_copy(). All these constructors are fully inlined, so we'll never pay a penalty for passing small things by reference... the compiler can see that and just pass by value. BUG=skia: Review URL: https://codereview.chromium.org/1215523004
* add drawImageNineGravatar reed2015-06-25
| | | | | | | | this also exposes nine-patch drawing directly to devices, and creates a shared iterator for unrolling a nine-patch into single rect->rect draws. BUG=skia: Review URL: https://codereview.chromium.org/1211583003
* add SkCanvas::drawAtlasGravatar reed2015-06-24
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1181913003
* Remove the SkCanvas comment APIGravatar fmalita2015-06-15
| | | | | | | | No longer used in Chromium/Blink. R=reed@google.com,robertphillips@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1153593003
* Disable direction pre-caching to suss out TSAN failures.Gravatar mtklein2015-06-15
| | | | | | | | | | Our bots don't seem to mind / see the race... let's see if Chrome's do. BUG=chromium:496982 TBR=reed@google.com Review URL: https://codereview.chromium.org/1169033003
* SkPath::Direction serves two masters:Gravatar reed2015-06-10
| | | | | | | | | | | | | - input param to addFoo (e.g. addRect), where only CW or CCW are valid) - output param from computing functions, that sometimes return kUnknown This CL's intent is to split these into distinct enums/features: - Direction (public) loses kUnknown, and is only used for input - FirstDirection (private) is used for computing the first direction we see when analyzing a contour BUG=skia: Review URL: https://codereview.chromium.org/1176953002
* Sketch splitting SkPicture into an interface and SkBigPicture.Gravatar mtklein2015-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds small pictures for drawRect(), drawTextBlob(), and drawPath(). These cover about 89% of draw calls from Blink SKPs, and about 25% of draw calls from our GMs. SkPicture handles: - serialization and deserialization - unique IDs Everything else is left to the subclasses: - playback(), cullRect() - hasBitmap(), hasText(), suitableForGPU(), etc. - LayerInfo / AccelData if applicable. The time to record a 1-op picture improves a good chunk (2 mallocs to 1), and the time to record a 0-op picture greatly improves (2 mallocs to none): picture_overhead_draw: 450ns -> 350ns picture_overhead_nodraw: 300ns -> 90ns BUG=skia: Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b Latest blink_linux_rel: http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248 Committed: https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/62015 Review URL: https://codereview.chromium.org/1112523006
* Revert of Sketch splitting SkPicture into an interface and SkBigPicture. ↵Gravatar mtklein2015-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #25 id:480001 of https://codereview.chromium.org/1112523006/) Reason for revert: win_chromium_compile_dbg_ng FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\skia\src\core\skia.SkBitmapHeap.obj.rsp /c ..\..\third_party\skia\src\core\SkBitmapHeap.cpp /Foobj\third_party\skia\src\core\skia.SkBitmapHeap.obj /Fdobj\skia\skia.cc.pdb e:\b\build\slave\win\build\src\third_party\skia\include\core\skpicture.h(176) : error C2487: 'CURRENT_PICTURE_VERSION' : member of dll interface class may not be declared with dll interface Original issue's description: > Sketch splitting SkPicture into an interface and SkBigPicture. > > Adds small pictures for drawRect(), drawTextBlob(), and drawPath(). > These cover about 89% of draw calls from Blink SKPs, > and about 25% of draw calls from our GMs. > > SkPicture handles: > - serialization and deserialization > - unique IDs > > Everything else is left to the subclasses: > - playback(), cullRect() > - hasBitmap(), hasText(), suitableForGPU(), etc. > - LayerInfo / AccelData if applicable. > > The time to record a 1-op picture improves a good chunk > (2 mallocs to 1), and the time to record a 0-op picture > greatly improves (2 mallocs to none): > > picture_overhead_draw: 450ns -> 350ns > picture_overhead_nodraw: 300ns -> 90ns > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b > > Latest blink_linux_rel: > > http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248 > > Committed: https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec TBR=reed@google.com,robertphillips@google.com,fmalita@chromium.org,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1130283004
* Sketch splitting SkPicture into an interface and SkBigPicture.Gravatar mtklein2015-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds small pictures for drawRect(), drawTextBlob(), and drawPath(). These cover about 89% of draw calls from Blink SKPs, and about 25% of draw calls from our GMs. SkPicture handles: - serialization and deserialization - unique IDs Everything else is left to the subclasses: - playback(), cullRect() - hasBitmap(), hasText(), suitableForGPU(), etc. - LayerInfo / AccelData if applicable. The time to record a 1-op picture improves a good chunk (2 mallocs to 1), and the time to record a 0-op picture greatly improves (2 mallocs to none): picture_overhead_draw: 450ns -> 350ns picture_overhead_nodraw: 300ns -> 90ns BUG=skia: Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b Latest blink_linux_rel: http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248 Review URL: https://codereview.chromium.org/1112523006
* Revert of Sketch splitting SkPicture into an interface and SkBigPicture. ↵Gravatar reed2015-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #22 id:420001 of https://codereview.chromium.org/1112523006/) Reason for revert: speculative revert to fix failures in DEPS roll Original issue's description: > Sketch splitting SkPicture into an interface and SkBigPicture. > > Adds small pictures for drawRect(), drawTextBlob(), and drawPath(). > These cover about 89% of draw calls from Blink SKPs, > and about 25% of draw calls from our GMs. > > SkPicture handles: > - serialization and deserialization > - unique IDs > > Everything else is left to the subclasses: > - playback(), cullRect() > - hasBitmap(), hasText(), suitableForGPU(), etc. > - LayerInfo / AccelData if applicable. > > The time to record a 1-op picture improves a good chunk > (2 mallocs to 1), and the time to record a 0-op picture > greatly improves (2 mallocs to none): > > picture_overhead_draw: 450ns -> 350ns > picture_overhead_nodraw: 300ns -> 90ns > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b TBR=reed@google.com,robertphillips@google.com,mtklein@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1130333002
* Sketch splitting SkPicture into an interface and SkBigPicture.Gravatar mtklein2015-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds small pictures for drawRect(), drawTextBlob(), and drawPath(). These cover about 89% of draw calls from Blink SKPs, and about 25% of draw calls from our GMs. SkPicture handles: - serialization and deserialization - unique IDs Everything else is left to the subclasses: - playback(), cullRect() - hasBitmap(), hasText(), suitableForGPU(), etc. - LayerInfo / AccelData if applicable. The time to record a 1-op picture improves a good chunk (2 mallocs to 1), and the time to record a 0-op picture greatly improves (2 mallocs to none): picture_overhead_draw: 450ns -> 350ns picture_overhead_nodraw: 300ns -> 90ns BUG=skia: Review URL: https://codereview.chromium.org/1112523006
* Rename SkCanvasDrawable to SkDrawable, and make publicGravatar reed2015-02-06
| | | | | | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/903993002/)" This reverts commit c4e87724920222a218f31b22612efc5b1ec0ed6c. BUG=skia: TBR= NOTREECHECKS=True Review URL: https://codereview.chromium.org/898343004
* Revert of rename SkCanvasDrawable to SkDrawable, and make public (patchset ↵Gravatar reed2015-02-06
| | | | | | | | | | | | | | | | | | | | | | | | #2 id:20001 of https://codereview.chromium.org/903993002/) Reason for revert: bug in gyp Original issue's description: > rename SkCanvasDrawable to SkDrawable, and make public > > BUG=skia: > NOTRY=True > ... winbuilder flake > > Committed: https://skia.googlesource.com/skia/+/4ae9eb7463cf2160723407359608f221c0d5e2a6 TBR=robertphillips@google.com,djsollen@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/882853006
* rename SkCanvasDrawable to SkDrawable, and make publicGravatar reed2015-02-06
| | | | | | | | BUG=skia: NOTRY=True ... winbuilder flake Review URL: https://codereview.chromium.org/903993002
* Pre-cache fDirection and fConvexity for recorded SkPaths too.Gravatar mtklein2015-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN/builds/1211/steps/dm/logs/stdio I don't see any big perf hit locally: desk_googlespreadsheetdashed.skp 1.68ms -> 1.74ms 1.04x desk_mobilenews.skp 643us -> 665us 1.04x desk_tigersvg.skp 51.1us -> 52.5us 1.03x desk_jsfiddlehumperclip.skp 37us -> 37.9us 1.02x desk_samoasvg.skp 373us -> 380us 1.02x desk_wordpress.skp 697us -> 708us 1.02x desk_mapsvg.skp 698us -> 708us 1.02x tabl_googleblog.skp 553us -> 560us 1.01x desk_wowwiki.skp 1.31ms -> 1.32ms 1.01x tabl_mozilla.skp 1.44ms -> 1.45ms 1.01x desk_sfgate.skp 156us -> 157us 1.01x desk_chalkboard.skp 376us -> 378us 1x desk_baidu.skp 101us -> 101us 1x desk_gmailthread.skp 231us -> 231us 1x desk_carsvg.skp 379us -> 379us 1x desk_googlehome.skp 38.1us -> 38.1us 1x desk_css3gradients.skp 89.6us -> 89.2us 1x desk_googlespreadsheet.skp 549us -> 546us 0.99x desk_pokemonwiki.skp 8.67ms -> 8.62ms 0.99x tabl_mlb.skp 294us -> 291us 0.99x tabl_gamedeksiam.skp 700us -> 692us 0.99x tabl_worldjournal.skp 143us -> 142us 0.99x desk_blogger.skp 441us -> 436us 0.99x desk_twitter.skp 452us -> 446us 0.99x desk_gws.skp 152us -> 150us 0.99x tabl_gmail.skp 24.2us -> 23.9us 0.99x tabl_sahadan.skp 84.7us -> 83.5us 0.99x tabl_cnn.skp 1.24ms -> 1.22ms 0.99x tabl_ukwsj.skp 543us -> 535us 0.99x desk_yahooanswers.skp 124us -> 123us 0.99x desk_booking.skp 905us -> 891us 0.98x tabl_androidpolice.skp 1.76ms -> 1.73ms 0.98x desk_ugamsolutions.skp 281us -> 276us 0.98x desk_nytimes.skp 209us -> 204us 0.98x tabl_techmeme.skp 98.4us -> 96.1us 0.98x tabl_nofolo.skp 59.2us -> 57.8us 0.98x desk_weather.skp 244us -> 238us 0.98x desk_facebook.skp 546us -> 531us 0.97x desk_linkedin.skp 321us -> 311us 0.97x tabl_digg.skp 801us -> 770us 0.96x tabl_culturalsolutions.skp 332us -> 319us 0.96x desk_amazon.skp 103us -> 99us 0.96x tabl_engadget.skp 610us -> 579us 0.95x tabl_cnet.skp 144us -> 136us 0.95x desk_fontwipe.skp 36.6us -> 34.7us 0.95x desk_ebay.skp 173us -> 164us 0.94x tabl_hsfi.skp 5.95us -> 5.58us 0.94x tabl_deviantart.skp 134us -> 126us 0.94x desk_espn.skp 261us -> 243us 0.93x BUG=skia: Review URL: https://codereview.chromium.org/861853002
* Clean up dead clear() code in SkRecord.Gravatar mtklein2015-01-05
| | | | | | | | | | | | | This removes the SkRecords::Clear struct and everything that refers to it. Notice there is nothing actually creating a Clear, which means this is all dead code. Now that all ops obey the clip, I don't think we need the weird inflate-empty-to-epsilon hack for BBH queries. BUG=skia: Review URL: https://codereview.chromium.org/835813002
* remove unused drawDataGravatar reed2015-01-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/830083002
* Cull pushCull and popCull from Skia.Gravatar mtklein2014-12-12
| | | | | | | | These calls are unused and going away. Waiting on crrev.com/796083002. BUG=skia: Review URL: https://codereview.chromium.org/794263002
* Enforce thread-safety of bitmaps in pictures via the type.Gravatar mtklein2014-12-11
| | | | | | | | | | | No runtime difference here, but it makes it impossible to forget to make a shallow copy; you can't get at the full bitmap without it. NOTREECHECKS=true BUG=skia: Review URL: https://codereview.chromium.org/799603002
* Remove SkCanvas::drawBitmapMatrix()Gravatar Florin Malita2014-12-10
| | | | | | R=mtklein@google.com, reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/789033002
* Change clear() to respect the clipGravatar reed2014-12-04
| | | | | | | | | This reverts commit af641a1c10f176cb9617026d3cc93c117a85d13d. BUG=skia: TBR= Review URL: https://codereview.chromium.org/783493002
* Revert "Change clear() to respect the clip"Gravatar reed2014-12-02
| | | | | | | | | This reverts commit 3729469d6a12266037b697c2192768545e097ab0. BUG=skia: TBR= Review URL: https://codereview.chromium.org/778563002
* Change clear() to respect the clipGravatar reed2014-12-02
| | | | | | | | patch from issue 769703002 at patchset 1 (http://crrev.com/769703002#ps1) BUG=skia: Review URL: https://codereview.chromium.org/772533004
* Force SkMatrix type while recording too.Gravatar mtklein2014-12-01
| | | | | | | | | | | | | | | | | | | | | This switches to a new way of doing this, enforcing the caching with the type recorded rather than having to do it in SkRecorder. Should be more foolproof. Updated SkPath and SkBitmap's equivalents too. ImmutableBitmap was close, but using inheritance now makes the rest of the code less weird. BUG=437511 I'm not sure whether or not this will _fix_ the SkMatrix aspect of that bug. There may be other SkMatrices that we're racing on. It does cover the obvious ones, though, and removing the SkTRacy<> wrapper will allow TSAN to show us any other races. It turned out to be easier to turn missing optional matrices into I early rather than late. I figure this should be harmless. Recording and playback perf both look neutral. Review URL: https://codereview.chromium.org/773433003
* All the small packing tweaks mentioned in the bug.Gravatar mtklein2014-11-21
| | | | | | BUG=skia:3144 Review URL: https://codereview.chromium.org/748063002
* SkRecord: Pack SkRegion::Op and AA bit together.Gravatar mtklein2014-11-20
| | | | | | | | Saves 4 bytes per clip op. BUG=skia: Review URL: https://codereview.chromium.org/741093002
* wip for drawablesGravatar reed2014-11-18
| | | | | | | | | | | | Idea: 1. in its mutable recording state, keep a table of drawables on the side, and store an index in the record list. 2. In "immediate-mode" draw, just call the clients drawable directly (need access to our private list to turn the stored index into a proc) 3. when we "snap", we replace the list of drawables with a list of (sub) pictures, and then during playback of the snapped picture, we invoke a private drawable which just calls "drawPicture" on the index'd subpicture. Review URL: https://codereview.chromium.org/727363003
* Override SkCanvas::drawImage() in SkRecorder.Gravatar piotaixr2014-10-16
| | | | | | BUG=skia:2947 Review URL: https://codereview.chromium.org/610003002
* Simplify a little in SkRecords.h:Gravatar mtklein2014-09-18
| | | | | | | | | | | | | - ACT_AS_PTR can just expose const methods to get at the pointers. (If the thing stored must stay const, we pass a const T.) - DrawPatch works fine with Record# macros, so use Record5. BUG=skia: R=fmalita@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/585523003