brianosman
8fe485b793
Just pass the draw context to paint conversion
...
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
2016-07-25 12:31:51 -07:00
brianosman
1638c0deea
Add destination color space to AsFPArgs. Eliminates last XFORMTODO.
...
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
2016-07-25 05:12:53 -07:00
robertphillips
28a838e532
Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h
...
Just another step in reining in the GrPLB
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086293006
Review-Url: https://codereview.chromium.org/2086293006
2016-06-23 14:07:00 -07:00
bungeman
06ca8ec87c
sk_sp for Ganesh.
...
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
2016-06-09 08:01:03 -07:00
csmartdalton
ecbc12b1c1
Replace targetHasUnifiedMultisampling in GrPB constructor
...
Replaces targetHasUnifiedMultisampling with a simpler "useHWAA". Now
the code that creates a pipeline builder needs to decide on its own
whether it should enable multisampling, rather than relying on the
builder to try and guess.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041283002
Review-Url: https://codereview.chromium.org/2041283002
2016-06-08 10:08:43 -07:00
robertphillips
55fdcccf01
Remove GrRenderTarget from GrPipelineBuilder
...
This used to be "Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder"
but has been split into:
https://codereview.chromium.org/1993263002/ (Make GrAppliedClip friendless)
https://codereview.chromium.org/1997773002/ (Retract GrRenderTarget from GLProgramsTest)
https://codereview.chromium.org/1993403002/ (GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext))
https://codereview.chromium.org/2004433002/ (Retract GrRenderTarget from GrTestTarget)
https://codereview.chromium.org/2015333002/ (Change parameters to GrPipelineBuilder's ctor)
https://codereview.chromium.org/2035823002/ (Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1988923002
Review-Url: https://codereview.chromium.org/1988923002
2016-06-06 06:16:21 -07:00
robertphillips
40ff8ed522
Change parameters to GrPipelineBuilder's ctor
...
This is just plumbing prep to remove the GrRenderTarget from the GrPipelineBuilder.
Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2015333002
Review-Url: https://codereview.chromium.org/2015333002
2016-05-28 08:51:06 -07:00
cdalton
862cff30ea
Remove clip from GrPipelineBuilder
...
This eliminates a copy and will allow us to make the GrClip class
virutal.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966903004
Review-Url: https://codereview.chromium.org/1966903004
2016-05-12 15:09:48 -07:00
robertphillips
175dd9b5e3
Clean up test drawContext usage
...
The general idea is to provide access to SkGpuDevice's drawContext rather than its GrRenderTarget. That is usually what the testing framework actually wants.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930623003
Review-Url: https://codereview.chromium.org/1930623003
2016-04-28 14:32:04 -07:00
robertphillips
6c7e325236
Bring sk_sp to GrDrawContext
...
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
2016-04-27 10:47:51 -07:00
brianosman
898235c486
SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's 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
2016-04-06 07:38:23 -07:00
reed
2ad1aa67c6
partial switch over to sp usage of shaders
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776973003
Review URL: https://codereview.chromium.org/1776973003
2016-03-09 09:50:50 -08:00
robertphillips
391395dcfb
Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003
Committed: https://skia.googlesource.com/skia/+/86c60758e9e4f9e203d7462cb22b2a245a0f51bd
Review URL: https://codereview.chromium.org/1754563003
2016-03-02 09:26:36 -08:00
robertphillips
8b8f36fc49
Revert of Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (patchset #7 id:120001 of https://codereview.chromium.org/1754563003/ )
...
Reason for revert:
fAuditTrail
Original issue's description:
> Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003
>
> Committed: https://skia.googlesource.com/skia/+/86c60758e9e4f9e203d7462cb22b2a245a0f51bd
TBR=joshualitt@chromium.org ,bsalomon@google.com,joshualitt@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/1754353002
2016-03-02 08:53:12 -08:00
robertphillips
86c60758e9
Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1754563003
Review URL: https://codereview.chromium.org/1754563003
2016-03-02 08:43:13 -08:00
joshualitt
04194f32f4
Remove two varieties of drawNonAARect from GrDrawTarget
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584703003
Review URL: https://codereview.chromium.org/1584703003
2016-01-13 10:08:27 -08:00
robertphillips
504ce5dc77
Optionally pass rendertarget to getTestTarget
...
This shouldn't really make any difference but allocating and holding on to a GrRenderTarget for each test target generates image differences for Mali GPUs. This CL allows an existing render target to be used for the test target.
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1447113002
2015-11-16 11:02:05 -08:00
bsalomon
f1b7a1d828
Make skpaint->grpaint flow work for composing draws (verts and atlas)
...
One side effect is that the SkShader's (or implicit shader's) fragment processor is responsible for the transition from an unpremul paint color to a premul color.
Review URL: https://codereview.chromium.org/1348583002
2015-09-28 06:26:29 -07:00
bsalomon
aca31fea8c
Stop supporting HW dither
...
Review URL: https://codereview.chromium.org/1359833004
2015-09-22 11:38:46 -07:00
halcanary
2a24338c77
GM: replace boilerplate with macros
...
I have verified locally that nothing draws differently.
Motivation:
* SK_SIMPLE_GM makes it easier to write a GM.
* Reducing 1100 lines of code makes maintenance easier.
* Simple GMs are easy to convert to Fiddles.
Review URL: https://codereview.chromium.org/1333553002
2015-09-09 08:16:41 -07:00
halcanary
96fcdcc219
Style Change: NULL->nullptr
...
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
bsalomon
ac856c97ac
Remove GrStagedProcessor, remove the word Stage as it applies to FPs
...
Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7
Review URL: https://codereview.chromium.org/1307223004
2015-08-27 06:30:17 -07:00
halcanary
385fe4d4b6
Style Change: SkNEW->new; SkDELETE->delete
...
DOCS_PREVIEW= https://skia.org/?cl=1316123003
Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
rmistry
4bf69f7bbc
Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )
...
Reason for revert:
Causes bot failures:
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702
https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223
Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7
TBR=joshualitt@google.com ,egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1306803003
2015-08-26 06:48:27 -07:00
bsalomon
24243446cd
Remove GrStagedProcessor, remove the word Stage as it applies to FPs
...
Review URL: https://codereview.chromium.org/1307223004
2015-08-26 05:39:18 -07:00
joshualitt
d2b23e0ee6
Standardize BW to NonAA
...
TBR=bsalomon@google.com , robertphillips@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1310533004
2015-08-21 10:53:34 -07:00
joshualitt
b6b513b805
Create separate entry points for the various flavors of drawRect
...
BUG=skia:
Review URL: https://codereview.chromium.org/1308503002
2015-08-21 10:25:18 -07:00
caryclark
1818acb6a4
rename portable_typeface_always to portable_typeface
...
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1257773002
2015-07-24 12:09:25 -07:00
joshualitt
1c735488cb
Start to propagate constness of GrPipelineBuilder up the stack
...
BUG=skia:
Review URL: https://codereview.chromium.org/1229143007
2015-07-13 08:08:25 -07:00
joshualitt
7b670db2b4
Remove setFromPaint from GrPipelineBuilder
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1227153003
2015-07-09 13:25:02 -07:00
caryclark
65cdba6ba7
Revert of Revert of make gm background colors 565 compatible (patchset #1 id:1 of https://codereview.chromium.org/1184123002/ )
...
Reason for revert:
underlying problem with portable refs deleted more than once fixed
Original issue's description:
> Revert of make gm background colors 565 compatible (patchset #2 id:20001 of https://codereview.chromium.org/1176243006/ )
>
> Reason for revert:
> breaks many bots with refcnt error
>
> Original issue's description:
> > make gm background colors 565 compatible
> >
> > Change a batch of GM tests to convert their background color
> > so that it is representable in 8888 and 565.
> >
> > Enable portable text in those same tests to minimize platform
> > differences.
> >
> > In a couple of bitmap tests, use portable typefaces instead of
> > choosing 'Times' which may or may not be available on the platform.
> >
> > R=borenet@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/be7f768a357aefb39c42d24b81b24d647bb6ab70
>
> TBR=borenet@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/0bdb08b1ba8fbd18c4838f86a23f1ef4b3a3bfdf
TBR=borenet@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1182403003
2015-06-15 06:51:08 -07:00
caryclark
0bdb08b1ba
Revert of make gm background colors 565 compatible (patchset #2 id:20001 of https://codereview.chromium.org/1176243006/ )
...
Reason for revert:
breaks many bots with refcnt error
Original issue's description:
> make gm background colors 565 compatible
>
> Change a batch of GM tests to convert their background color
> so that it is representable in 8888 and 565.
>
> Enable portable text in those same tests to minimize platform
> differences.
>
> In a couple of bitmap tests, use portable typefaces instead of
> choosing 'Times' which may or may not be available on the platform.
>
> R=borenet@google.com
>
> Committed: https://skia.googlesource.com/skia/+/be7f768a357aefb39c42d24b81b24d647bb6ab70
TBR=borenet@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1184123002
2015-06-15 05:28:00 -07:00
caryclark
be7f768a35
make gm background colors 565 compatible
...
Change a batch of GM tests to convert their background color
so that it is representable in 8888 and 565.
Enable portable text in those same tests to minimize platform
differences.
In a couple of bitmap tests, use portable typefaces instead of
choosing 'Times' which may or may not be available on the platform.
R=borenet@google.com
Review URL: https://codereview.chromium.org/1176243006
2015-06-15 05:09:59 -07:00
bsalomon
bed83a66f5
Don't draw if SkShader::asNewFragmentProcessor fails.
...
BUG=chromium:473156
Review URL: https://codereview.chromium.org/1089063002
2015-04-15 14:18:34 -07:00
bsalomon
c9c3e62b4e
Add constant color GrFP.
...
Committed: https://skia.googlesource.com/skia/+/dfbbec436cbcacc3270d4b28357c8393e67d6494
Review URL: https://codereview.chromium.org/978713002
2015-04-02 11:12:09 -07:00
bsalomon
599ea40cec
Revert of Add constant color GrFP. (patchset #10 id:180001 of https://codereview.chromium.org/978713002/ )
...
Reason for revert:
Revert while investigating assertions.
Original issue's description:
> Add constant color GrFP.
>
> Committed: https://skia.googlesource.com/skia/+/dfbbec436cbcacc3270d4b28357c8393e67d6494
TBR=egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1055023002
2015-04-02 08:33:54 -07:00
bsalomon
dfbbec436c
Add constant color GrFP.
...
Review URL: https://codereview.chromium.org/978713002
2015-04-01 14:54:57 -07:00