bsalomon
473addf176
Remove separate cache for clip mask textures
...
Review URL: https://codereview.chromium.org/1377943003
2015-10-02 07:49:06 -07:00
vbuzinov
3e77ba96d5
Implement stencil clipping in mixed sampled render targets
...
This change enables multisampled clipping for mixed sampled
render targets. Previously clipping in mixed samples config
behaved the same as in the gpu config.
In order to retrofit non-MSAA draw methods, programmable sample
locations are used in order to colocate all samples at (0.5, 0.5).
Requires support for NV_sample_locations.
BUG=skia:4399
Review URL: https://codereview.chromium.org/1232103002
2015-09-30 23:02:06 -07:00
reed
b39abc4d76
remove unused helper function
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1376603006
2015-09-29 18:27:59 -07:00
herb
62a69c26b3
Move Mutexy things to private.
...
There is no API change.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1368333004
2015-09-29 11:47:45 -07:00
bsalomon
e25eea4b36
Use child processors to implement compose color filter.
...
Review URL: https://codereview.chromium.org/1368423003
2015-09-29 06:38:55 -07: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
bsalomon
87ba62e67c
Replace GrExtractAlphaFragmentProcessor with DstIn compose processor
...
Review URL: https://codereview.chromium.org/1347943003
2015-09-22 06:42:00 -07:00
mdempsky
106b12427e
Remove SkNEW and SkDELETE macros
...
This CL removes the uses of SkNEW that have resprouted since commit
385fe4d
, and removes the macros entirely now that Android and Chromium
have been cleaned up to no longer depend on them.
A bunch of files implicitly depend on #include <new> from SkPostConfig.h
still though, so keep that for now. To be fixed in a followup CL.
[mtklein mucking around]
Only public API removed.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1360653004
2015-09-22 06:10:35 -07:00
halcanary
0fc1dbe592
SK_API for include/gpu/gl/GrGLInterface.h
...
Review URL: https://codereview.chromium.org/1357823003
2015-09-21 08:22:19 -07:00
reed
3322a8137d
share code between SkGr and Cacherator
...
BUG=skia:
Review URL: https://codereview.chromium.org/1351533004
2015-09-16 10:09:24 -07:00
bsalomon
ae4738f677
Create fragment processor for performing input color blend with child processor
...
The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes.
Review URL: https://codereview.chromium.org/1334293003
2015-09-15 15:33:27 -07:00
ericrk
0a5fa484fd
Add onMemoryDump to GrContext
...
Adds an entry point to GrContext to allow enumeration and tracing of GPU resources
via the newly added SkTraceMemoryDump.
Plan is for Chrome to call this on each of its GrContexts.
Dumps both the total size of GPU resources, as well as the total purgeable size.
BUG=526261
Review URL: https://codereview.chromium.org/1313743002
2015-09-15 14:16:10 -07:00
egdaniel
723b0501e2
Add support for blending of LCD for all blend modes.
...
BUG=skia:
Review URL: https://codereview.chromium.org/1313623002
2015-09-15 09:31:40 -07:00
bsalomon
506c802a3d
Add helper for creating leaf FPs inside GrFP::TestCreate functions
...
Review URL: https://codereview.chromium.org/1334273003
2015-09-14 13:16:26 -07:00
egdaniel
ec00d94199
Move some of the adding stencil attachment logic of Gpu and into Render Target.
...
The new flow of calls for attaching a Stencil looks like:
Client
rt->attachStencilAttachment()
gpu->getStencilAttachment()
glgpu->createStencilAttachment()
glrt->completeStencilAttachment() //actually attaches
BUG=skia:
Review URL: https://codereview.chromium.org/1333383002
2015-09-14 12:56:10 -07:00
bsalomon
b5b603241a
Test that GrFragmentProcessors work without input colors.
...
Committed: https://skia.googlesource.com/skia/+/72c58e7052af2a0855412ce4b249f977069db751
Review URL: https://codereview.chromium.org/1341853002
2015-09-14 12:26:34 -07:00
bsalomon
59ce45fe79
Revert of Test that GrFragmentProcessors work without input colors. (patchset #2 id:20001 of https://codereview.chromium.org/1341853002/ )
...
Reason for revert:
Need to fix up more processor subclasses.
Original issue's description:
> Test that GrFragmentProcessors work without input colors.
>
> Committed: https://skia.googlesource.com/skia/+/72c58e7052af2a0855412ce4b249f977069db751
TBR=joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1338403003
2015-09-14 12:01:42 -07:00
bsalomon
72c58e7052
Test that GrFragmentProcessors work without input colors.
...
Review URL: https://codereview.chromium.org/1341853002
2015-09-14 11:55:52 -07:00
hendrikw
eddbefb4a5
skia: Add ANGLE with GL backend to nanobench/DM
...
This will allow us to test this without hacking it in, might be useful
for others too.
Review URL: https://codereview.chromium.org/1338003002
2015-09-11 13:07:29 -07:00
reed
85d9178832
Use SkImageCacherator in SkImages
...
Possible follow-up changes to consider
1. Roll SkImage_Raster and _Gpu into _Generator, where the generator (or cacherator) is backed by a pre-existing texture or raster.
2. Evolve SkImageUsageType into a verb requiring stretching, and have the caller (common code) digest the caps() and usage, so that subclasses are just told what to do (stretch or not)
3. Common code/utility to convert an unstretched texture into a stretch one (and cache it) if the generator can only make an unstretched one.
BUG=skia:
Review URL: https://codereview.chromium.org/1282363002
2015-09-10 14:33:38 -07:00
joshualitt
f238469b05
Late creation of GrPathProcessor
...
BUG=skia:
Review URL: https://codereview.chromium.org/1337513002
2015-09-10 11:00:51 -07:00
bsalomon
6c6f65885b
Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessing the same GrContext to read back GPU input data
...
BUG=chromium:524717
TBR=reed@google.com
Committed: https://skia.googlesource.com/skia/+/eb662bc407cec0585a821946fef123102cae64db
Review URL: https://codereview.chromium.org/1329313002
2015-09-10 08:12:46 -07:00
bsalomon
32ab260ee1
Revert of Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessin… (patchset #1 id:1 of https://codereview.chromium.org/1329313002/ )
...
Reason for revert:
breaking the bots
Original issue's description:
> Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessing the same GrContext to read back GPU input data
>
> BUG=chromium:524717
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/eb662bc407cec0585a821946fef123102cae64db
TBR=reed@google.com ,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:524717
Review URL: https://codereview.chromium.org/1334603002
2015-09-09 18:57:49 -07:00
bsalomon
eb662bc407
Add a mutex to GrContext::readSurfacePixels to protect against multiple CPU raster threads accessing the same GrContext to read back GPU input data
...
BUG=chromium:524717
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1329313002
2015-09-09 18:05:03 -07:00
bsalomon
cb1ccfd205
SK_API on GrWrapTextureInBitmap
...
BUG=chromium:524717
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1334563002
2015-09-09 14:51:52 -07:00
wangyix
809e5afdd9
Brian requested a new namespace for factories that create fragment processors that combine 2 things with a xfermode. This way, we can change the implementation of these factories in the future to not use GrComposeEffect if desired.
...
BUG=skia:4182
Review URL: https://codereview.chromium.org/1306163005
2015-09-09 12:58:32 -07:00
joshualitt
af2533a165
Make GrProcessorDataManager a noop
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1323963003
2015-09-09 10:00:12 -07:00
bsalomon
1fcc01c415
GrPathRangeBatch
...
BUG=skia:
Review URL: https://codereview.chromium.org/1315563003
2015-09-09 09:48:06 -07:00
reed
43fe6185c5
refactor parts of SkGr.cpp for use by SkImages
...
BUG=skia:
Review URL: https://codereview.chromium.org/1315353006
2015-09-08 08:37:36 -07:00
bungeman
a3434d83cf
Add skstd::unique_ptr and use it.
...
TBR=bsalomon@google.com
The one gpu include change is just to fix swap in implementation.
Review URL: https://codereview.chromium.org/1330503006
2015-09-07 12:45:52 -07:00
jvanverth
5a42c33f27
Add new surface flag
...
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1320533005
2015-09-02 12:26:10 -07:00
joshualitt
dac7005b87
Remove GrGpuTraceMarker hooks until we rethink the design
...
TBR=bsalomon@google.com
BUG=526308
Review URL: https://codereview.chromium.org/1323823003
2015-09-01 08:19:46 -07:00
bsalomon
c21b09eec9
Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
...
Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa
Review URL: https://codereview.chromium.org/1316513002
2015-08-28 18:46:56 -07:00
rmistry
a511e6ad10
Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (patchset #8 id:140001 of https://codereview.chromium.org/1316513002/ )
...
Reason for revert:
Primary suspect in failing DEPS rolls:
* https://codereview.chromium.org/1315753006
* https://codereview.chromium.org/1308323006
* https://codereview.chromium.org/1320903004
Primary suspect because the failing win bots did not fail in https://codereview.chromium.org/1315753005
Original issue's description:
> Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
>
> Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa
TBR=joshualitt@google.com ,wangyix@google.com,robertphillips@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1313573005
2015-08-28 17:16:50 -07:00
bsalomon
ecfdc251be
Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
...
Review URL: https://codereview.chromium.org/1316513002
2015-08-28 14:33:47 -07:00
bungeman
761cf6186e
Clean up SkTLogic.
...
This change regularizes Skia's type traits so that when <type_traits>
can finally be used the transition is easier. Various traits are
renamed to match <type_traits> and placed in the skstd namespace.
Current users of these traits are updated.
Review URL: https://codereview.chromium.org/1317593004
2015-08-28 07:09:20 -07:00
bsalomon
4204800cd8
Convert child FPs from refs to pending executions when parent converts
...
Review URL: https://codereview.chromium.org/1315923004
2015-08-27 16:43:48 -07:00
mdempsky
38f1f6f9e5
Remove overly complicated GR_CREATE_STATIC_PROCESSOR macro
...
This macro was responsible for producing code like:
static SkAlignedStorage<sizeof(Foo)> g_gFoo_Storage;
static Foo* gFoo = new(g_gFoo_Storage.get()) Foo;
static SkAutoTDestroy<Foo> gFoo_ad(gFoo);
which would allocate static storage for an object of type Foo
(g_gFoo_Storage), lazily instantiate the object in that memory (via
gFoo's initializer), and then ensure that at global destruction time
the object is destroyed (via gFoo_Ad's destructor).
However, the exact same effect is achieved by just writing:
static Foo gFoo;
Review URL: https://codereview.chromium.org/1314763009
2015-08-27 12:57:01 -07:00
hendrikw
885bf09255
skia: add ability to load command_buffer_gles2
...
BUG=skia:
Review URL: https://codereview.chromium.org/1306823003
2015-08-27 10:38:39 -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
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
robertphillips
63926683c5
Add ANGLE workaround to prefer flushes over VRAM usage
...
On the whole, https://codereview.chromium.org/1286203002/ (Defer flushes if kPreferNoIO is specified) improved performance but it did cause a performance regression on ANGLE. This CL disables the deferral of flushes on ANGLE until we can add a separate incremental flushing mechanism.
TBR=bsalomon@google.com
BUG=skia:4201
BUG=521529
Review URL: https://codereview.chromium.org/1287193008
2015-08-20 09:39:02 -07:00
bungeman
99fe822606
Use static_assert instead of SK_COMPILE_ASSERT.
...
Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion
Review URL: https://codereview.chromium.org/1306443004
2015-08-20 07:57:52 -07:00
bungeman
f3c15b7cfc
Move SkTemplates.h to private.
...
SkTemplates.h contains a number of Skia specific utilities which are
not designed for external use. In addition to reducing the external
support burden, this will allow Skia to freely refactor this file.
Review URL: https://codereview.chromium.org/1272293004
2015-08-19 11:56:48 -07:00
mtklein
790d74f7c1
No need to re-declare pure virtual name().
...
Fixes inconsistent override warning.
BUG=skia:
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1293413003
2015-08-19 11:05:39 -07:00
bsalomon
7dea7b7df1
Use calloc to allocate data that will be uploaded to vertex/index buffers in Chrome
...
BUG=chromium:454267
BUG=chromium:522315
Review URL: https://codereview.chromium.org/1300123002
2015-08-19 08:26:51 -07:00