aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
...
* Compute clipped draw bounds outside GrAppliedClip.Gravatar Brian Salomon2017-03-14
| | | | | | | | | | | | We will be storing GrAppliedClips alongside ops. The op already stores the clipped bounds. If GrAppliedClip has draw bounds then as ops combine the GrAppliedClip's bounds should be merged to be consistent. However, we won't actually ever use those bounds again so it would be wasteful to merge them. Change-Id: I4ef3010dc04761e256120a2e0e074bc3c6ff6ca1 Reviewed-on: https://skia-review.googlesource.com/9642 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Begin implementation of SkImage_Base::makeColorSpaceGravatar Matt Sarett2017-03-14
| | | | | | | | | | | | | | Originally: https://skia-review.googlesource.com/9622 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android BUG=skia: Change-Id: I7ef1daaab32892399e3333e4b2fc75d70a1900e4 Reviewed-on: https://skia-review.googlesource.com/9651 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* vertices to/from dataGravatar Mike Reed2017-03-14
| | | | | | | | | | | precursor to enabling serialization in pictures BUG=skia:6366 Change-Id: Iba89aa98f389b3281e7705d041e3337e89071f03 Reviewed-on: https://skia-review.googlesource.com/9680 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Generaly Fixes to gpu bezier codeGravatar Greg Daniel2017-03-14
| | | | | | | | | BUG=skia: Change-Id: I2246aa0b2bc3327df42ca30d35020a4b878a819b Reviewed-on: https://skia-review.googlesource.com/9555 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* add SkVertices::BuilderGravatar Mike Reed2017-03-14
| | | | | | | | | | | | | | | | | | Possible next iterations: - remove another allocation use the SkData trick to share the object and its (trailing) data - store a bit that tells use to free each pointer, allowing the builder to "adopt" some allocations instead of copy. Larger idea: - merge with drawPoints to have a single object for both. BUG=skia:6366 Change-Id: Iec33239aa2ad5d00b36469ca0b88934ddf6f22eb Reviewed-on: https://skia-review.googlesource.com/9604 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Begin implementation of SkImage_Base::makeColorSpace"Gravatar Mike Reed2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98629efdde9236e444d7b3fa644eaab3a1301566. Reason for revert: unittest failures Failures: ../../../tests/ImageTest.cpp:1099 0x28 == SkGetPackedR32(*p3Bitmap.getAddr32(0, 0)) ../../../tests/ImageTest.cpp:1100 0x40 == SkGetPackedG32(*p3Bitmap.getAddr32(0, 0)) ../../../tests/ImageTest.cpp:1101 0x5E == SkGetPackedB32(*p3Bitmap.getAddr32(0, 0)) Original change's description: > Begin implementation of SkImage_Base::makeColorSpace > > BUG=skia: > > Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a > Reviewed-on: https://skia-review.googlesource.com/9622 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I6ce2a28ca581f7d01322588c2435133d8c6a2435 Reviewed-on: https://skia-review.googlesource.com/9649 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Expose SkColorSpaceTransferFn inversion functionGravatar Brian Osman2017-03-14
| | | | | | | | | | | Also adds tolerance to checks against zero BUG=skia: Change-Id: I2ad5737c6eef7e3ed52a685dceb347a434607336 Reviewed-on: https://skia-review.googlesource.com/9643 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Remove unused SkBitmap::RLEPixelsGravatar Leon Scroggins III2017-03-14
| | | | | | | | | | TBR=reed@google.com Change-Id: I14a75b7cad89aa7eb4b146a5d269856a4ad5d821 Reviewed-on: https://skia-review.googlesource.com/9646 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add const to GrColorSpaceXform member argumentsGravatar Brian Osman2017-03-14
| | | | | | | | | BUG=skia: Change-Id: I643c486066a0cd48e9c985ab5f3ee453c2a533c5 Reviewed-on: https://skia-review.googlesource.com/9644 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Use SkTArray for mailbox pollingGravatar Florin Malita2017-03-14
| | | | | | | | | | The mailbox uses SkTArray internally, so swapping is optimal when dest has no preallocated storage. Change-Id: Ic295f3707d07c97b1881e775cac3a23a6b2fef71 Reviewed-on: https://skia-review.googlesource.com/9641 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Begin implementation of SkImage_Base::makeColorSpaceGravatar Matt Sarett2017-03-14
| | | | | | | | | BUG=skia: Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a Reviewed-on: https://skia-review.googlesource.com/9622 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Consolidate Proxy caching code in GrResourceProviderGravatar Robert Phillips2017-03-14
| | | | | | | | | | | This doesn't implement the GrSurfaceProxy-based caching but just carves out a space for it. Split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: Iec87b45e3264b349d7804f63e361e970b925e335 Reviewed-on: https://skia-review.googlesource.com/9626 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Purge GrTextBlobCache entries on SkTextBlob deletionGravatar Florin Malita2017-03-14
| | | | | | | | | Similar to the SkImage purge mechanism. Change-Id: I0b7fb1bad507a3c7f30a4f7514bedd894d1748ac Reviewed-on: https://skia-review.googlesource.com/9631 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Preparatory ProxificationGravatar Robert Phillips2017-03-14
| | | | | | | | | This is pulled out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: I93e233cd80d98c848d79272423cb58505d72ff3e Reviewed-on: https://skia-review.googlesource.com/9559 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Increase precision of equality checking for color space transfer fnsGravatar Matt Sarett2017-03-14
| | | | | | | | | BUG=skia: Change-Id: I7b921d34539c071e63a47fb7151dc1dcdaa08cb3 Reviewed-on: https://skia-review.googlesource.com/9636 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Move GrSurfaceContext.h and GrTextureContext.h to src/gpu from include/gpuGravatar Brian Salomon2017-03-14
| | | | | | | Change-Id: I5b68650d2417018e217a2fef2f852316ebd9de6f Reviewed-on: https://skia-review.googlesource.com/9637 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrClipsStackClip member from SkGpuDeviceGravatar Brian Salomon2017-03-13
| | | | | | | Change-Id: Ibfbfeda86e3d6a819bf198af5c36852744897fb8 Reviewed-on: https://skia-review.googlesource.com/9635 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Remove origin from GrClipStackClip and GrWindowRectsState.Gravatar Brian Salomon2017-03-13
| | | | | | | Change-Id: I993f426fee0f21cf1f529f58d242de3017253678 Reviewed-on: https://skia-review.googlesource.com/9623 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* GrTessellator (AA): implement fast path for non-intersecting geometry.Gravatar Stephen White2017-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the common case, there are no intersections in the inner or outer meshes generated for edge-AA. In that case, we don't have to build connector edges, and we don't need to run the full simplify and tessellate path on the full combined mesh. In order to maintain the correspondence between inner and outer meshes, we can keep partner pointers between inner and outer vertices instead. So the new flow is: - stroke the original boundaries to generate inner & outer meshes - assign partner pointers to join inner & outer vertices - build Edges only for Inner and Outer contours - sort the two meshes independently - do a complexity check on both meshes (simplified Bentley-Ottmann that just aborts on the first found intersection) - if neither mesh is complex, use the fast path: - tessellate only the inner mesh - return the outer mesh, and use the partner pointers to generate the outer geometry triangles - otherwise, use the complex path (as before): - connect the inner & outer partners with Connector Edges - merge the inner & outer meshes via sorted_merge() - simplify and tessellate the resulting complete mesh On a 2012 Retina MBP (Intel), this yields: Canvas Arcs +6% Stroke Shapes +6% Fill Shapes +15% On a Z620 Ubuntu w/NVidia GTX 650: Canvas Arcs: +5.0% Stroke Shapes: +1.8% Fill Shapes: +17.6% Other changes: - implemented VertexList::append(VertexList), for use by sorted_merge() - renamed boundary_to_aa_mesh() to stroke_boundary(), and made it append inner & outer contours to inner & outer meshes - the connect() loop at the bottom of stroke_boundary() now uses open VertexLists, since it can then append them easily to the inner & outer meshes - sort_and_simplify() changed to sort_mesh(), with merging and simplification done explicitly by the callers - sorted_merge() factored out of merge_sort(), for use when zipping together the inner and outer meshes Change-Id: Ib00f9f12a375412eff35dd2bb78ccd787d9c37ce Reviewed-on: https://skia-review.googlesource.com/9600 Commit-Queue: Stephen White <senorblanco@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* More SkCSXformCanvas work.Gravatar Mike Klein2017-03-13
| | | | | | | | | | | | | | - handle color arrays in drawPatch(), drawVertices(), drawAtlas() - color filters Color filter support is a one-off for SkModeColorFilter. I don't know any other color filters that are parameterized by a color. If there are any/many, we may want to wire up something more comprehensive here. Change-Id: Ibc89574e3a32d38af3bc2443a7d4bac0bb52d493 Reviewed-on: https://skia-review.googlesource.com/9601 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add query to GrXPFactory about coverage-as-alpha optimizationGravatar Brian Salomon2017-03-13
| | | | | | | | | This will be needed to have GrDrawOps that haven't yet built pipelines. Change-Id: If5292aaa5dc9f98dccbe27be98960b630332158d Reviewed-on: https://skia-review.googlesource.com/9480 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Restore deferred GPU resources in ChromeGravatar Robert Phillips2017-03-13
| | | | | | | Change-Id: Ib52668b46e7d077175dcba12a3ccc8abc1f0c7a9 Reviewed-on: https://skia-review.googlesource.com/9552 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* SkColorSpaceXformCanvasGravatar Mike Klein2017-03-13
| | | | | | | | | | | | | | | TODO: images shaders color filters image filters a couple stray color arrays Change-Id: Ib91639bb0a6a00af737dd5186180011fe5120860 Reviewed-on: https://skia-review.googlesource.com/9529 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* use AutoRestore instead of making a copy of the clipstackGravatar Mike Reed2017-03-13
| | | | | | | | | BUG=skia: Change-Id: I86683156926f7c63c83790eaf313112ba5fab763 Reviewed-on: https://skia-review.googlesource.com/9532 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Remove SK_SUPPORT_LEGACY_BROKEN_LERP supportGravatar Florin Malita2017-03-13
| | | | | | | | | | | | | | Chromium change landed. BUG=chromium:696216 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I3e67392b0fdad8c5a3ad256e4f190123dff6c846 Reviewed-on: https://skia-review.googlesource.com/9551 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Changes to GrProcessorSet::FragmentProcessorAnalysis to prepare for deferred ↵Gravatar Brian Salomon2017-03-13
| | | | | | | | | | | | | | | pipeline creation. This compacts the object so that it is more efficient for ops to store it. It also adds a new constructor and query that will allow ops to use the analysis to also store the GrPaint's color. This has the side effect of limiting the number of color processors on a GrProcessorSet to 64K which is just under 64K more than should ever be needed. Change-Id: I4e6bc8e3f81bb2ff6a73af685beb6fb928a3de67 Reviewed-on: https://skia-review.googlesource.com/8972 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Treat cross context images as Ganesh-created resourcesGravatar Brian Osman2017-03-13
| | | | | | | | | | | | | | Always create them budgeted, and register them with the cache (not as wrapped resources). Re-land (with fixes) of: https://skia-review.googlesource.com/9497 BUG=skia: Change-Id: I2df7198adc99efa3eea99fc86b0b2930136f22c7 Reviewed-on: https://skia-review.googlesource.com/9544 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove run count field from SkTextBlob.Gravatar Florin Malita2017-03-13
| | | | | | | | | | | | | We can flag the last run record instead. Run iteration is always sequential, so no penalty. As a side effect, we can no longer allow instantiation of zero-run text blobs - but that seems like a good idea anyway. Change-Id: I7ca80c4780623d5a188f92dfe6d6fe152f20f666 Reviewed-on: https://skia-review.googlesource.com/9149 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* disable assert until I can understand why it fails in cc_unittestsGravatar Mike Reed2017-03-10
| | | | | | | | | | BUG=skia: Change-Id: I475b7b43e17f17f8f2a50e93ae0ce8a5b918b041 NOTRY=True Reviewed-on: https://skia-review.googlesource.com/9547 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Treat cross context images as Ganesh-created resources"Gravatar Brian Osman2017-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cccda60aca592d2320d79e2871e057778b2688ab. Reason for revert: Android and Windows bot failures. Original change's description: > Treat cross context images as Ganesh-created resources > > Always create them budgeted, and register them with the cache (not as > wrapped resources). > > BUG=skia: > > Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805 > Reviewed-on: https://skia-review.googlesource.com/9497 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ib7bebcad33037dd206c9b06b5cb6c503b00accba Reviewed-on: https://skia-review.googlesource.com/9541 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix SkFILEStream.Gravatar Ben Wagner2017-03-10
| | | | | | | Change-Id: I8c66e4e3e857227aed3d0bc497982f4c0d96d917 Reviewed-on: https://skia-review.googlesource.com/9498 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Check for bad bounds in picture cullboundsGravatar Mike Reed2017-03-10
| | | | | | | | | BUG=skia: Change-Id: Icaed150fa005ba7539bcca4646710b42dfcbf94a Reviewed-on: https://skia-review.googlesource.com/9536 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Treat cross context images as Ganesh-created resourcesGravatar Brian Osman2017-03-10
| | | | | | | | | | | | Always create them budgeted, and register them with the cache (not as wrapped resources). BUG=skia: Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805 Reviewed-on: https://skia-review.googlesource.com/9497 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead ↵Gravatar Florin Malita2017-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of raw ptrs"" This reverts commit 3304c447b953dad79fe7f355184ac13ed7e302e0. Reason for revert: Fix for SkTHashMap issue landed Original change's description: > Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs" > > This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9. > > Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds; need to investigate. > > Original change's description: > > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs > > > > Refactor to store sk_sps, and minimize explicit ref manipulation. > > > > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 > > Reviewed-on: https://skia-review.googlesource.com/9490 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a > Reviewed-on: https://skia-review.googlesource.com/9524 > Reviewed-by: Florin Malita <fmalita@google.com> > Commit-Queue: Florin Malita <fmalita@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,fmalita@chromium.org,fmalita@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ba50e3b574381717fbbf46b829d72aceff8f7fe Reviewed-on: https://skia-review.googlesource.com/9535 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* re-guard against negative dimensions on no-draw canvasGravatar Mike Reed2017-03-10
| | | | | | | | | | | | We used to (incidentally) guard for this when we used bitmapdevice as our backnig. Now that we have a (faster) nodrawdevice, we need to explicitly guard for it. BUG=skia: Change-Id: I9cbbf064cbfced78f0004a2e5aff60aa3ded6215 Reviewed-on: https://skia-review.googlesource.com/9530 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Reed <reed@google.com>
* put sksl->glsl modifiers in correct orderGravatar Ethan Nicholas2017-03-10
| | | | | | | | | BUG=skia:6352 Change-Id: I7cdf6fa9c5b48fd2686c5cfc28c594bd291feea5 Reviewed-on: https://skia-review.googlesource.com/9520 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Remove ownership aruments from render target wrap functionsGravatar Brian Osman2017-03-10
| | | | | | | | | | | We never adopt render targets (just borrow them). BUG=skia: Change-Id: Ie899b814a7a81339a8735bbd7ad9facc66e580d7 Reviewed-on: https://skia-review.googlesource.com/9525 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Partially defer SkImage_GpuGravatar Robert Phillips2017-03-10
| | | | | | | | | One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options. Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d Reviewed-on: https://skia-review.googlesource.com/9488 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* clipstacks can be on the stack or embedded, therefore should not be ref-countedGravatar Mike Reed2017-03-10
| | | | | | | | | BUG=skia: Change-Id: I7e16034d463a1db1baac404f775cf33076cbbf73 Reviewed-on: https://skia-review.googlesource.com/9509 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Clients can provide preallocated storage to clipstackGravatar Mike Reed2017-03-10
| | | | | | | | | | | | | | | | | | | | This allows devices (gpu, pdf) which are themselves always dynamically allocated (since they are reference counted) to provide storage to clipstack, allowing it to avoid calls to malloc. Previously this was attempted by embedding the storage directly in clipstack, but that increased the size of clipstack in all instances, even those where it might be on the stack. This can be problematic for small-stack environments like servers. See previous (reverted) CL: https://skia-review.googlesource.com/c/9522/ BUG=skia: Change-Id: Ifc7f5ef411303f33513195b1502ea9f281e995c5 Reviewed-on: https://skia-review.googlesource.com/9508 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "prealloc room for some number of Elements to avoid malloc"Gravatar Mike Reed2017-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94cbbba96f1a2a425663e631c09591023f2e48d7. Reason for revert: exceeded stack-size on g3 (in SkPDFDevice.cpp:1552 Original change's description: > prealloc room for some number of Elements to avoid malloc > > I chose 16, as in my test case from android, the depth was > at least 9. Possibly we could make it even smaller if our > underlying impl (SkDeque) would never prune its allocations, > so that we don't malloc repeatedly if we save/restore/save/restore > across the boundary of the first/nth chunk... > > BUG=skia: > > Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d > Reviewed-on: https://skia-review.googlesource.com/9522 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I22c45970b1e3f585087ed22f75c300df00c8124d Reviewed-on: https://skia-review.googlesource.com/9505 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* prealloc room for some number of Elements to avoid mallocGravatar Mike Reed2017-03-10
| | | | | | | | | | | | | | | I chose 16, as in my test case from android, the depth was at least 9. Possibly we could make it even smaller if our underlying impl (SkDeque) would never prune its allocations, so that we don't malloc repeatedly if we save/restore/save/restore across the boundary of the first/nth chunk... BUG=skia: Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d Reviewed-on: https://skia-review.googlesource.com/9522 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"Gravatar Florin Malita2017-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9. Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds; need to investigate. Original change's description: > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs > > Refactor to store sk_sps, and minimize explicit ref manipulation. > > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 > Reviewed-on: https://skia-review.googlesource.com/9490 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a Reviewed-on: https://skia-review.googlesource.com/9524 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com>
* Mark function used as template parameter extern.Gravatar Ben Wagner2017-03-09
| | | | | | | | | | | | VC++19.10.2517 does not support the C++11 change to allow the address of internal linkage objects to be used as non-type template arguments. BUG=skia:6351 Change-Id: I7e1f628db794f950dfba7d043cf6d2fbf0a8c453 Reviewed-on: https://skia-review.googlesource.com/9496 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrsGravatar Florin Malita2017-03-09
| | | | | | | | | Refactor to store sk_sps, and minimize explicit ref manipulation. Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 Reviewed-on: https://skia-review.googlesource.com/9490 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove more unused ownership argumentsGravatar Brian Osman2017-03-09
| | | | | | | | | | | | | Technically, we only ever pass kAdopt along one specific code path, but the remaining functions that have it are at least all similar. This was another outlier that seems unlikely to ever benefit. BUG=skia: Change-Id: If9a1275a2a0b83417225660f5e18c2133681830a Reviewed-on: https://skia-review.googlesource.com/9494 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp ↵Gravatar Brian Salomon2017-03-09
| | | | | | | | | | | | derived classes. The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work. Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef Reviewed-on: https://skia-review.googlesource.com/9481 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove unused ownership argument to GrSurfaceProxy::MakeWrappedBackendGravatar Brian Osman2017-03-09
| | | | | | | | | | | | This is the last public reference to GrWrapOwnership, so removal paves the way for moving it to somewhere internal. BUG=skia: Change-Id: I876298642ff812452a644c1d2b9519691eac44b9 Reviewed-on: https://skia-review.googlesource.com/9492 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add tolerance to quadratic and linear cubic detectionGravatar csmartdalton2017-03-09
| | | | | | | | | | | | Otherwise these can be misclassified as cusps since there is already tolerance in the discriminant test. BUG=skia: Change-Id: Id02c12f671714cebf799953ebed5335ee4c4d52a Reviewed-on: https://skia-review.googlesource.com/9355 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add GrSemaphoreOp to support deferred semaphore useGravatar Greg Daniel2017-03-09
| | | | | | | | | | | This is a precursor to adding support for external drawable ops. BUG=skia: Change-Id: I3e8b06b4cbe2b5728b7911c22ee74a93d0813f98 Reviewed-on: https://skia-review.googlesource.com/9452 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>