aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice_drawTexture.cpp
Commit message (Collapse)AuthorAge
* Rename GrDrawContext to GrRenderTargetContextGravatar Brian Osman2016-10-27
| | | | | | | | | | | | | | This is in preparation for GrTextureContext and GrSurfaceContext BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030 Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd Reviewed-on: https://skia-review.googlesource.com/4030 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix Ganesh analytic blurred rect drawsGravatar robertphillips2016-08-22
| | | | | | | | | | | | | | This CL does two things: It fixes the SkBlurMaskFilterImpl::directFilterRRectMaskGPU draw path to explicitly handle rects It fixes the SkGpuDevice::drawTextureProducerImpl draw path to provide the correct (src & device space) inputs to directFilterRRectMaskGPU. How this was working before was that GrRRectBlurEffect::Make would reject rect-rrects and the code would fallback to GrBlurUtils::drawPathWithMaskFilter which mapped the rect-rrect into device space correctly (of course, the rect-ness of the path was removed at that point so it was going through the slow path). GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268583002 Review-Url: https://codereview.chromium.org/2268583002
* Implement GPU occluded blur mask filterGravatar robertphillips2016-08-10
| | | | | | | | Spawned off: https://codereview.chromium.org/2214163003/ (Minor clean up related to blur mask filters) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201133002 Review-Url: https://codereview.chromium.org/2201133002
* Create blurred RRect mask on GPU (rather than uploading it)Gravatar robertphillips2016-08-10
| | | | | | | | | | | | This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates) All blurred rrects using the "analytic" path will change slightly with this CL. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004 Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479 Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50 Review-Url: https://codereview.chromium.org/2222083004
* Revert of Create blurred RRect mask on GPU (rather than uploading it) ↵Gravatar robertphillips2016-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #5 id:80001 of https://codereview.chromium.org/2222083004/ ) Reason for revert: No NoGPU bot on commit queue ? Original issue's description: > Create blurred RRect mask on GPU (rather than uploading it) > > This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates) > > All blurred rrects using the "analytic" path will change slightly with this CL. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004 > > Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479 > Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50 TBR=bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2232953002
* Create blurred RRect mask on GPU (rather than uploading it)Gravatar robertphillips2016-08-10
| | | | | | | | | | | This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates) All blurred rrects using the "analytic" path will change slightly with this CL. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004 Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479 Review-Url: https://codereview.chromium.org/2222083004
* Revert of Create blurred RRect mask on GPU (rather than uploading it) ↵Gravatar robertphillips2016-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #4 id:60001 of https://codereview.chromium.org/2222083004/ ) Reason for revert: Erg - dumb bug Original issue's description: > Create blurred RRect mask on GPU (rather than uploading it) > > This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates) > > All blurred rrects using the "analytic" path will change slightly with this CL. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004 > > Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479 TBR=bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2236493002
* Create blurred RRect mask on GPU (rather than uploading it)Gravatar robertphillips2016-08-10
| | | | | | | | | | This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates) All blurred rrects using the "analytic" path will change slightly with this CL. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004 Review-Url: https://codereview.chromium.org/2222083004
* Minor clean up related to blur mask filtersGravatar robertphillips2016-08-05
| | | | | | | | This is the non-substantive portion of: https://codereview.chromium.org/2201133002/ (Implement GPU occluded blur mask filter) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2214163003 Review-Url: https://codereview.chromium.org/2214163003
* Just pass the draw context to paint conversionGravatar brianosman2016-07-25
| | | | | | | | | | Concentrate on using draw context functionality to answer gamma and color related queries in more places. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182603003 Review-Url: https://codereview.chromium.org/2182603003
* Add destination color space to AsFPArgs. Eliminates last XFORMTODO.Gravatar brianosman2016-07-25
| | | | | | | | | | | | This is going to be needed in many more places as I finish connecting the dots. Even better - I'd like to switch to a world where SkColorSpace != nullptr is the only signal we use for gamma-correct rendering, so I can eliminate SkSourceGammaTreatment and SkSurfaceProps::isGammaCorrect. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180503002 Review-Url: https://codereview.chromium.org/2180503002
* Connect dst color space in a few places (removing TODOs)Gravatar brianosman2016-07-22
| | | | | | | | | | | There is one more XFORMTODO left, but it requires more plumbing. With this change, certain drawing paths do gamut conversion with no special hacking required. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174843002 Review-Url: https://codereview.chromium.org/2174843002
* sk_sp for Ganesh.Gravatar bungeman2016-06-09
| | | | | | | | | | Convert use of GrFragmentProcessor, GrGeometryProcessor, and GrXPFactory to sk_sp. This clarifies ownership and should reduce reference count churn by moving ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004 Review-Url: https://codereview.chromium.org/2041113004
* Add new SkSourceGammaTreatment enum, used in situations like mipmap ↵Gravatar brianosman2016-06-06
| | | | | | | | | construction, where we need to know if we should respect (vs. ignore) the gamma encoding of sRGB tagged images. Plumb that extensively. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2037413002 Review-Url: https://codereview.chromium.org/2037413002
* Add isUnifiedMultisampled entry point to GrDrawContextGravatar robertphillips2016-05-16
| | | | | | | | | | GrRenderTargetProxy supports the isUnifiedMultisampled call so GrDrawContext will be able to support it even when GrRenderTargetProxy-backed. This is split out of: https://codereview.chromium.org/1930013002/ ((Mostly) Retract GrRenderTarget from SkGpuDevice) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1982583002 Review-Url: https://codereview.chromium.org/1982583002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f Review-Url: https://codereview.chromium.org/1957363002
* Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of ↵Gravatar bsalomon2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1957363002/ ) Reason for revert: Breaking some bots Original issue's description: > Replace GrStrokeInfo with GrStyle. > > A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 > > Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f TBR=egdaniel@google.com,robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1967513002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Review-Url: https://codereview.chromium.org/1957363002
* Bring sk_sp to GrDrawContextGravatar robertphillips2016-04-27
| | | | | | | | This is split out of: https://codereview.chromium.org/1914883002/ (Refactor drawContext/RenderTarget creation) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1918003003 Review-Url: https://codereview.chromium.org/1918003003
* Skia Filter Quality and Scaling MetricsGravatar ericrk2016-04-18
| | | | | | | | | | | | | | | | Adds histogram metrics to log the filter quality and scale factor of each image draw. To make the data easier to consume, this is broken down into a number of individual histograms: - Filter quality across all draw calls - Scale amount across all draw calls - Scale amount per filter quality (4 histograms total) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686203002 Committed: https://skia.googlesource.com/skia/+/f57b3a6e4a002caf01378832cbd756c6c163a783 Review URL: https://codereview.chromium.org/1686203002
* Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriateGravatar brianosman2016-04-13
| | | | | | | | | | | Trying to be much more explicit about where we really mean sRGB as a format, and where we mean gamma-correct, as in: "not legacy behavior". Most of the changes to rendering behavior are dependent on the latter, so let's be precise. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884873006 Review URL: https://codereview.chromium.org/1884873006
* SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's ↵Gravatar brianosman2016-04-06
| | | | | | | | | | | | propagated in a few places so that the backend can do the right thing for L32 vs S32 mode. Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering. Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007 Review URL: https://codereview.chromium.org/1845283003
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Revert of Skia Filter Quality and Scaling Metrics (patchset #3 id:60001 of ↵Gravatar ericrk2016-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1686203002/ ) Reason for revert: reverting this to address Ilya's comments. Original issue's description: > Skia Filter Quality and Scaling Metrics > > Adds histogram metrics to log the filter quality and scale factor of > each image draw. To make the data easier to consume, this is broken > down into a number of individual histograms: > - Filter quality across all draw calls > - Scale amount across all draw calls > - Scale amount per filter quality (4 histograms total) > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686203002 > > Committed: https://skia.googlesource.com/skia/+/f57b3a6e4a002caf01378832cbd756c6c163a783 TBR=bsalomon@google.com,isherman@chromium.org # 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/1735423002
* Skia Filter Quality and Scaling MetricsGravatar ericrk2016-02-25
| | | | | | | | | | | | | | Adds histogram metrics to log the filter quality and scale factor of each image draw. To make the data easier to consume, this is broken down into a number of individual histograms: - Filter quality across all draw calls - Scale amount across all draw calls - Scale amount per filter quality (4 histograms total) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686203002 Review URL: https://codereview.chromium.org/1686203002
* Add Histogram Macros to SkiaGravatar ericrk2016-02-05
| | | | | | | | | | | | | | | | | | | | | | | | Adds a set of histogram macros to Skia, modeled after Chrome's UMA_HISTOGRAM_* macros. These allow logging of high frequency events, and are useful to analyze real world usage of certain features. By default, these macros are no-ops. Users can provide a custom header file which defines these macros if they wish to collect histogram data. Chrome will provide such a header. I've currently only added two macros: - SK_HISTOGRAM_BOOLEAN - logs a true/false type relationship (whether we are tiling a texture or not on each draw). - SK_HISTOGRAM_ENUMERATION - logs a set of potential values (which of a number of choices were selected for the texture upload path). We could add more unused macros at the moment, but it seems easier to add these as needed, WDYT? BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1652053004 Review URL: https://codereview.chromium.org/1652053004
* Make "alpha only" be a property of GrTextureProducerGravatar bsalomon2015-12-09
| | | | Review URL: https://codereview.chromium.org/1507973005
* Retract GrRenderTarget a bitGravatar robertphillips2015-12-01
| | | | | | These sites don't necessarily need the full power of a GrRenderTarget object. This is a clean up for switching over to GrRenderTargetProxys. Review URL: https://codereview.chromium.org/1486923004
* Clean up Ganesh path render a little bitGravatar robertphillips2015-11-30
| | | | | | | | I'm not sure if this is an improvement but this is an attempt to start moving the handling of pathEffects up the call stack (ideally to SkGpuDevice). Note that the duplicate path sniffing in GrDrawContext::drawPath is still useful since it can be invoked if a path has to be explicitly drawn for a mask filter. Review URL: https://codereview.chromium.org/1472333003
* Initial implementation of GPU no filter NinePatchGravatar joshualitt2015-11-18
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1454933002
* Fix has_aligned_samples helper for SkGpuDevice::drawTextureProducerGravatar Brian Salomon2015-11-18
| | | | Review URL: https://codereview.chromium.org/1454183002 .
* Convert SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducerGravatar bsalomon2015-11-18
| | | | | | | | Move createFragmentProcessor to GrTextureProducer base class. Make non-tiled sw-bitmap draws go through drawTextureProducer. Review URL: https://codereview.chromium.org/1459433002
* API changes to GrTextureAdjuster.Gravatar bsalomon2015-11-12
| | | | | | | | | | | | | | | | These changes are to facilitate converting SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer. Make constraint rect relative to content area Store dimensions in GrTextureProducer Make originalTexture() protected. Remove getContentArea() Provide pre-normalized texture matrix to GrTextureAdjuster::createFragmentProcessor. Define it to be be relative to content area. Review URL: https://codereview.chromium.org/1438663004
* In SkGpuDevice;drawTextureAdjuster perform texture w\h divide in texture matrixGravatar bsalomon2015-11-11
| | | | Review URL: https://codereview.chromium.org/1440763002
* Separate out natively-texture image/bmp draws from cached-as-texture ↵Gravatar bsalomon2015-11-09
image/bmp draws This makes texture-backed images and bitmaps down a new code path. It adds a pinch point via the texture adjuster that will be used to handle copied necessary for different texture targets. It also fixes bugs in the existing code exhibited by recent updates to the bleed GM. The plan is to move the the sw/generator-backed imgs/bmps on to this code path with future changes. Review URL: https://codereview.chromium.org/1424313010