aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
Commit message (Collapse)AuthorAge
* Revert "Revert "clamp to premul when reading premul sRGB""Gravatar Mike Klein2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e018f548d76b0688f9873c683cffc681fec40ec. Reason for revert: doesn't appear to have been the roll problem. Original change's description: > Revert "clamp to premul when reading premul sRGB" > > This reverts commit 04e10da8362a0dcabd795a4ad53f617719ca0d20. > > Reason for revert: roll? > > Change-Id: Id0a8dcd62763bd6eddde120c513ca97e098a4268 > Reviewed-on: https://skia-review.googlesource.com/6022 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,reviews@skia.org,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I399ca5e728ce6766c6707682c4c6b685681ffdeb Reviewed-on: https://skia-review.googlesource.com/6025 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Add a deferred copy surface (take 2)"Gravatar Robert Phillips2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 398487a850431cf495330d4023607df5305a311f. Reason for revert: See if this is causing the roll failure Original change's description: > Add a deferred copy surface (take 2) > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) > > Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 > Reviewed-on: https://skia-review.googlesource.com/5939 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913 Reviewed-on: https://skia-review.googlesource.com/6024 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "clamp to premul when reading premul sRGB"Gravatar Mike Klein2016-12-14
| | | | | | | | | | | This reverts commit 04e10da8362a0dcabd795a4ad53f617719ca0d20. Reason for revert: roll? Change-Id: Id0a8dcd62763bd6eddde120c513ca97e098a4268 Reviewed-on: https://skia-review.googlesource.com/6022 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* clamp to premul when reading premul sRGBGravatar Mike Klein2016-12-13
| | | | | | | | | | | | | | | It's pretty easy to start with sound premultiplied linear floats, pack those to sRGB encoded bytes, then read them back to linear floats and find them not quite premultiplied, with a color channel just a smidge greater than the alpha channel. This can happen basically any time we have different transfer functions for alpha and colors... sRGB being the only one we draw into. This is an annoying problem with no known good solution. So apply the clamp hammer. These new calls on SkRasterPipeline should make it impossible to get wrong. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I4c974f4a7b151f3f684946f1e83d06b1b288fd01 Reviewed-on: https://skia-review.googlesource.com/5945 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add a deferred copy surface (take 2)Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 Reviewed-on: https://skia-review.googlesource.com/5939 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add a deferred copy surface"Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4431de6af930a8638c194b072558ea3a4b79d908. Reason for revert: ANGLE errors (at the very least) Original change's description: > Add a deferred copy surface > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > Change-Id: Iab1867668d8146a766201158a251b9174438ee2b > Reviewed-on: https://skia-review.googlesource.com/5773 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f Reviewed-on: https://skia-review.googlesource.com/5938 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surfaceGravatar Robert Phillips2016-12-13
| | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. Change-Id: Iab1867668d8146a766201158a251b9174438ee2b Reviewed-on: https://skia-review.googlesource.com/5773 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* SkBitmap::setPixelRef(): less reference churnGravatar Hal Canary2016-12-12
| | | | | | | | | BUG=skia: Change-Id: I9657e4af5fcc808f9175ff336155374ccc77999d Reviewed-on: https://skia-review.googlesource.com/5461 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Convert image width and height (used by tiling) to float once.Gravatar Mike Klein2016-12-12
| | | | | | | | | | | The storage cost is the same, so might as well do this when building the pipeline instead of when running it. This also avoids the awkward cvtsi2ss instruction that screws with register renaming. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I1c7d5bad558870256a31e3da969eee5d80fb93a8 Reviewed-on: https://skia-review.googlesource.com/5782 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* bicubic, attempt gazillionGravatar Mike Klein2016-12-09
| | | | | | | | | | | | | - explicitly separate bilinear_ stages in x and y too BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ib7b4f9d26ea6abe9171068e92424479d811ee606 Reviewed-on: https://skia-review.googlesource.com/5636 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Relandx2 "Remove antialiasing control from GrPaint."Gravatar Brian Salomon2016-12-09
| | | | | | | | | | | Fixes a bad merge. This reverts commit 073285c0595d46205d1482cc19af2d7d891bfeae. Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a Reviewed-on: https://skia-review.googlesource.com/5774 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Plumb dst color space in many places, rather than "mode"Gravatar Brian Osman2016-12-09
| | | | | | | | | | | | | | | | | This is less to type in most cases, and gives us more information (for things like picture-backed images, where we need to know all about the destination surface). Additionally, strip out the plumbing entirely for bitmap sources, where we don't need to know anything. BUG=skia: Change-Id: I4deff6c7c345fcf62eb08b2aff0560adae4313da Reviewed-on: https://skia-review.googlesource.com/5748 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Reland "Remove antialiasing control from GrPaint.""Gravatar Brian Salomon2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3944484020d98ff8f386378296106c321279482b. Reason for revert: Merges badly with a recent change. Will rebase and reland. Original change's description: > Reland "Remove antialiasing control from GrPaint." > > This contains fixes for GLPrograms test and mixed samples rendering. > > This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4. > > BUG=skia: > > Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87 > Reviewed-on: https://skia-review.googlesource.com/5763 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Iff9657041e28604a845bc5a9acec7c9b248c53bd Reviewed-on: https://skia-review.googlesource.com/5772 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Remove antialiasing control from GrPaint."Gravatar Brian Salomon2016-12-09
| | | | | | | | | | | | | This contains fixes for GLPrograms test and mixed samples rendering. This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4. BUG=skia: Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87 Reviewed-on: https://skia-review.googlesource.com/5763 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove SkImage::makeTextureImageGravatar Brian Osman2016-12-09
| | | | | | | | | | | | | | No one (other than test code) was using this API, and it lacks the context to do the right thing. Specifically, if this forces a decode of an encoded image, we don't know the intended use (re: color spaces) to determine how we should decode. BUG=skia: Change-Id: I6ff700b3a5adce8257f35c5e3dd5ba557b2a3219 Reviewed-on: https://skia-review.googlesource.com/5614 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Remove antialiasing control from GrPaint."Gravatar Brian Salomon2016-12-08
| | | | | | | | | | | This reverts commit 9f549358b3ac9f61e78b194e39d6ac6eb322e35e. Reason for revert: hitting asserts Change-Id: I542d34edc05ecf72b7646263f25736a0950c78e7 Reviewed-on: https://skia-review.googlesource.com/5707 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove antialiasing control from GrPaint.Gravatar Brian Salomon2016-12-08
| | | | | | | | | | | | | This adds an additional param (of new enum type GrAA) to draws that can antialias and a new enum GrAAType to indicate the AA technique (none, fragment shader computed coverage, msaa). Some GMs change due to this: 1) In some places we weren't disabling MSAA when the draw was supposed to be unantialiased. 2) Some bounding rect draws that use GrFragmentProcessors were unnecessarily turning on antialiasing, by disabling it a very small number of pixel LSBs change. Change-Id: I7d8d8793dda70bcd373d09055beb9949c1a8a4d0 Reviewed-on: https://skia-review.googlesource.com/5608 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Refactor bilerp a little.Gravatar Mike Klein2016-12-06
| | | | | | | | | | | | | | | | | | | 1) rename to bilerp_xy, for x,y in {n[egative], p[ositive}; 2) pull out a save_xy stage to save off the original x,y; 3) also calculate the fractional x,y fx,fy once instead of 4 times. 1) is a pure refactor; 2) adds a stage but otherwise is nothing different; 3) changes images a little bit (fractional parts can vary a bit around powers of two). This extends naturally to naive bicubic using 16 bicubic_xy stages. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I666de5c21e978abb4feb6e3225e5b5920ba6c5b9 Reviewed-on: https://skia-review.googlesource.com/5550 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Remove dest surface color mode from bitmap controllerGravatar Brian Osman2016-12-06
| | | | | | | | | | | This is already on the bitmap provider - no need to plumb it here. BUG=skia: Change-Id: Ie8c5aef8ea443c58d59598aa66e357ad4c212b25 Reviewed-on: https://skia-review.googlesource.com/5621 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* support medium and high qualityGravatar Mike Klein2016-11-30
| | | | | | | Change-Id: I4ed750932cd6c768e21ca9f4a9e7f5f2408cfa4d Reviewed-on: https://skia-review.googlesource.com/5323 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* SkEncodeImage: no more link-time registrationGravatar Hal Canary2016-11-30
| | | | | | | | | | | | | | | Also, no more SkImageEncoder class. SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS now only guards some old API shims. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5006 Change-Id: I3797f584f3e8e12ade10d31e8733163453725f40 Reviewed-on: https://skia-review.googlesource.com/5006 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Disable mipmap pre-generation pathGravatar Eric Karl2016-11-30
| | | | | | | | | | | | There is a bug in the mipmap pre-generation logic in use in getDeferredTextureImageData. This can cause runaway memory leaks, so we are disabling this path until we can investigate further. BUG=669775 Change-Id: I2027f6f7994e089edd4f3452284e894752b31779 Reviewed-on: https://skia-review.googlesource.com/5357 Reviewed-by: Brian Salomon <bsalomon@google.com>
* support a8Gravatar Mike Klein2016-11-29
| | | | | | | | | | | Most of this is plumbing through the full paint to shaders instead of just the filter quality. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I6afde07566afa3a4391c24dca7017a9a4f5ec700 Reviewed-on: https://skia-review.googlesource.com/5317 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Delete unnecessary SkSurface_Base APIGravatar Matt Sarett2016-11-29
| | | | | | | | | BUG=skia: Change-Id: I1263d390ffc1660a561b03c9dd866390754e59af Reviewed-on: https://skia-review.googlesource.com/5231 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* gather_i8Gravatar Mike Klein2016-11-29
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia7a133f515e29e16700aabc0633c77a703425f41 Reviewed-on: https://skia-review.googlesource.com/5239 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Consistent naming.Gravatar Mike Klein2016-11-29
| | | | | | | | | | | | | | | For stages that have {r,g,b,a} and {dr,dg,db,da} versions, name the {r,g,b,a} one "foo" and the {dr,dg,db,da} on "foo_d". The {r,g,b,a} registers are the ones most commonly used and fastest, so they get short ordinary names, and the d-registers are less commonly used and sometimes slower, so they get a suffix. Some stages naturally opearate on all 8 registers (the xfermodes, accumulate). These names for those look fine and aren't ambiguous. Also, a bit more re-arrangement in _opts.h. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia20029247642798a60a2566e8a26b84ed101dbd0 Reviewed-on: https://skia-review.googlesource.com/5291 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Split srgb out of accum stages.Gravatar Mike Klein2016-11-28
| | | | | | | | | | | | | | | | | | By stashing the scales in the context (i.e. on the stack), we can free up enough registers to really simplify how the bitmap sample stages interact. Nearest neighbor is straightforward now: just call the appropriate gather_ function, and you're done. The source pixels end up in the source registers. If they're sRGB encoded, follow up with from_srgb_s To bilerp, we bracket those 1 or 2 gather+from_srgb_s stages with a stage setting up each corner (x += dx, y += dy, save off scale) and a stage that accumulates into the d-registers (load saved scale, dr += scale * r, etc.). When all the samples are accumulated, copy the d-registers into the s-registers. from_srgb_d and to_srgb are lightly sketched here and will be used in the next CL, where I apply this same factoring to non-bitmap loads and stores. This is a little tricky, because we don't actually have a float->float to_srgb yet. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I272a1f278f0ea1b29a2f07ac225f753faa8dae81 Reviewed-on: https://skia-review.googlesource.com/5271 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GrTextureProducer cleanup, phase two: Producer, Adjuster, MakerGravatar Brian Osman2016-11-28
| | | | | | | | | | | | | | | | Previously: GrTextureProducer, GrTextureAdjuster, and GrTextureMaker were all in GrTextureParamsAdjuster.h. Now they're each in their own header. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5202 Change-Id: I17fa9057b11511aa4d3e15569ea1c378cfec4c80 Reviewed-on: https://skia-review.googlesource.com/5202 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Some simple pipeline refactoring.Gravatar Mike Klein2016-11-28
| | | | | | | | | | | | | | | | | | This is a batch of little tweaks that all preserve the existing logical behavior: - rename dst to move_dst_src to parallel move_src_dst - remove unused swap_src_dst - move swap_rb up with the other utility stages - factor out from_8888() to parallel from_565() and from_4444() - factor out gather() from the accum_* stages This changes the order of the math in accum_8888[_srgb] ever so slightly, from (scale * C) * (1/255.0f) to scale * (1/255.0f * C). It causes a few pixel diffs, but nothing noticeable. This makes the 8888 bilerp logic consistent with the other formats, which all convert to [0,1] float first before being scaled. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Id37857b91be3086565169dcc9b1a537574e532aa Reviewed-on: https://skia-review.googlesource.com/5226 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* GrTextureProducer cleanup, phase one: Bitmap and Image makersGravatar Brian Osman2016-11-28
| | | | | | | | | | | | | | | Split these into their own files, and actually name the files after the classes they contain. The top three classes in the hierarchy still need attention, but those are going to be trickier. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5195 Change-Id: I295f4d50e35748eac38a31f302e14b5b62653c55 Reviewed-on: https://skia-review.googlesource.com/5195 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* SkImageEncoder: simplify APIGravatar Hal Canary2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | (re-land 248ff02 & 2cb6cb7, with changes) - Hide SkImageEncoder class in private header. - SkImageEncoder::Type becomes SkEncodedImageFormat - SkEncodedFormat becomes SkEncodedImageFormat - SkImageEncoder static functions replaced with single function EncodeImage() - utility wrappers for EncodeImage() are in sk_tool_utils.h TODO: remove link-time registration mechanism. TODO: clean up clients use of API and flip the flag. TODO: implement EncodeImage() in chromeium/skia/ext Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0 Reviewed-on: https://skia-review.googlesource.com/4909 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-on: https://skia-review.googlesource.com/5186 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Revert 248ff023 & 2cb6cb72Gravatar Hal Canary2016-11-22
| | | | | | | | | | | | | | Revert "SkImageEncoder: simplify API" This reverts commit 248ff02331d7f73ee4b6c5a7eabeae1080c16cd4. Revert "Fix bug: can't convert nullptr -> bool" This reverts commit 2cb6cb7218171b357bb5c934f032ba69c7b78401. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151 NOTRY=true Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec Reviewed-on: https://skia-review.googlesource.com/5151 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* 4444 and gray 8Gravatar Mike Klein2016-11-22
| | | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5147 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: Id08804803b2bbeab4fa88538491e99e53d5c2efe Reviewed-on: https://skia-review.googlesource.com/5147 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Support sRGB 565.Gravatar Mike Klein2016-11-22
| | | | | | | | | | | | | | | It looks like I'm not going to be able to avoid supporting sRGB G8, I8, 565, 4444, 8888. (A8 and F16 will always be linear.) This fixes 565, and lays out the rest of the accum_*. I did a little reorganization to keep things in ascending bit depth, just for sanity. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5145 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: Ib0508e5a4ee1bab2044a76bcabc367841d634cd2 Reviewed-on: https://skia-review.googlesource.com/5145 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Handle nullptr from asTextureRefGravatar brianosman2016-11-22
| | | | | | | | | | This can fail, if the special image dimensions are larger than the maximum allowable render target dimensions. BUG=chromium:666519 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2520043003 Review-Url: https://codereview.chromium.org/2520043003
* remove SkPixelRef::refEncodedData()Gravatar Hal Canary2016-11-22
| | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5001 Change-Id: I15dba4f44c762ab69a23eb8a77adff5f63763e30 Reviewed-on: https://skia-review.googlesource.com/5001 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Reed <reed@google.com>
* accum_565 and accum_f16Gravatar Mike Klein2016-11-22
| | | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5125 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I2e338ae14db0068d9a09e16a0678dd2ee9f97efd Reviewed-on: https://skia-review.googlesource.com/5125 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Add SkOverdrawCanvas to detect overdrawGravatar Matt Sarett2016-11-22
| | | | | | | | | | | | | | | This is the first part of a multi-part change to detect and display gpu overdraw on Android. BUG:32370375 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4907 Change-Id: Ibba9d7343f2fd57397fa1168a5a5b1ef6ef91287 Reviewed-on: https://skia-review.googlesource.com/4907 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkImageEncoder: simplify APIGravatar Hal Canary2016-11-22
| | | | | | | | | | | | | | | | | | | | | | - Hide SkImageEncoder class in private header. - SkImageEncoder::Type becomes SkEncodedImageFormat - SkEncodedFormat becomes SkEncodedImageFormat - SkImageEncoder static functions replaced with single function EncodeImage() - utility wrappers for EncodeImage() are in sk_tool_utils.h TODO: remove link-time registration mechanism. TODO: clean up clients use of API and flip the flag. TODO: implement EncodeImage() in chromeium/skia/ext GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4909 Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70 Reviewed-on: https://skia-review.googlesource.com/4909 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* bilerpGravatar Mike Klein2016-11-22
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5107 Change-Id: I5c30105501cbdb57896d9ec35737494eabd5998b Reviewed-on: https://skia-review.googlesource.com/5107 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Rearrange NN sampling to more naturally support bilerp.Gravatar Mike Klein2016-11-21
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5105 Change-Id: Ic692b5faf2d33fee31b119ff8d3653118b25b7c2 Reviewed-on: https://skia-review.googlesource.com/5105 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Support decoding images to multiple formats, depending on usageGravatar Brian Osman2016-11-21
| | | | | | | | | | | | | | | | | | | | | | | | Our codec generator will now preserve any asked-for color space, and convert the encoded data to that representation. Cacherator now allows decoding an image to both legacy (nullptr color space), and color-correct formats. In color-correct mode, we choose the best decoded format, based on the original properties, and our backend's capabilities. Preference is given to the native format, when it's already texturable (sRGB 8888 or F16 linear). Otherwise, we prefer linear F16, and fall back to sRGB when that's not an option. Re-land (and fix) of: https://skia-review.googlesource.com/c/4438/ https://skia-review.googlesource.com/c/4796/ BUG=skia:5907 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4838 Change-Id: I20ff972ffe1c7e6535ddc501e2a8ab8c246e4061 Reviewed-on: https://skia-review.googlesource.com/4838 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* mirror tilingGravatar Mike Klein2016-11-18
| | | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5064 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I9d48ba73e145701245e5ec4f32c8c360da6baddd Reviewed-on: https://skia-review.googlesource.com/5064 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add handling for instantiate failure up the call stackGravatar Robert Phillips2016-11-18
| | | | | | | | | | | | | | | | | The following two CLs were created via grep: https://skia-review.googlesource.com/c/4929/ (Guard against instantiate & accessRenderTarget failures) https://skia-review.googlesource.com/c/4961/ (Remove accessRenderTarget call in SkGpuDevice ctor) This CL was created by running through all the tests and having instantiate fail so it catches up-stack failures to handle a null return. BUG=665681,665500,665621 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4991 Change-Id: I6611eec8d36679123eef140538ee2526fb18628f Reviewed-on: https://skia-review.googlesource.com/4991 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* perspective matrixGravatar Mike Klein2016-11-17
| | | | | | | | | | | | Nothing too tricky. The path of least resistance was to keep the matrix row-major when in perspective. It should make no difference in the end. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4983 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I48bb9de0265e7873c465874cc37076a8111f5ea1 Reviewed-on: https://skia-review.googlesource.com/4983 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* repeat tilingGravatar Mike Klein2016-11-17
| | | | | | | | | | | | Does the note in repeat() look right? GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4980 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I347023f312ab4643fc387e486192c3ae3357db8b Reviewed-on: https://skia-review.googlesource.com/4980 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Replace my confusion with a pointer to the explanation.Gravatar Mike Klein2016-11-17
| | | | | | | | | | NOTRY=true GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4982 Change-Id: I9f1686519ea1dd5b50dce2e6ecef22741468e9d6 Reviewed-on: https://skia-review.googlesource.com/4982 Reviewed-by: Herb Derby <herb@google.com>
* Rename GrTextureParams to GrSamplerParamsGravatar Brian Salomon2016-11-17
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965 Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671 Reviewed-on: https://skia-review.googlesource.com/4965 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Strength reduce bilerp to nearest neighbor when the matrix is integer translate.Gravatar Mike Klein2016-11-17
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4967 Change-Id: I986f5695660d198532f5b0b367868ae904de92a1 Reviewed-on: https://skia-review.googlesource.com/4967 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Support SkImageShader in SkRasterPipeline blitterGravatar Mike Klein2016-11-17
| | | | | | | | | | | | | | First of many CLs, I'm sure. This handles 8888 or sRGB sources with an affine matrix, clamp/clamp tiling, and nearest-neighbor sampling only. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4906 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I99f7508852b3d44b6f52f7a0bee29a793af35c48 Reviewed-on: https://skia-review.googlesource.com/4906 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>