bsalomon
08bf86d1b7
Revert of Store context options on caps. (patchset #3 id:40001 of https://codereview.chromium.org/1158433006/ )
...
Reason for revert:
breaking chromeos build (???)
Original issue's description:
> Store context options on caps.
>
> Committed: https://skia.googlesource.com/skia/+/f28cff71db2cbb1ff18a8fbf1e80ca761d1f69bc
TBR=joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1151603005
2015-05-22 12:41:05 -07:00
bsalomon
f28cff71db
Store context options on caps.
...
Review URL: https://codereview.chromium.org/1158433006
2015-05-22 12:25:41 -07:00
cdalton
9a70920db2
Implement Porter Duff XP with a blend table
...
Removes the runtime logic used by PorterDuffXferProcessor to decide
blend coeffs and shader outputs, and instead uses a compile-time
constant table of pre-selected blend formulas.
Introduces a new blend strategy for srcCoeff=0 that can apply coverage
with a reverse subtract blend equation instead of dual source
blending.
Adds new macros in GrBlend.h to analyze blend formulas both runtime.
Removes kSetCoverageDrawing_OptFlag and GrSimplifyBlend as they are no
longer used.
Adds a GM that verifies all xfermodes, including arithmetic, with the
color/coverage invariants used by Porter Duff.
Adds a unit test that verifies each Porter Duff formula with every
color/coverage invariant.
Major changes:
* Uses a reverse subtract blend equation for coverage when srcCoeff=0
(clear, dst-out [Sa=1], dst-in, modulate). Platforms that don't
support dual source blending no longer require a dst copy for
dst-in and modulate.
* Sets BlendInfo::fWriteColor to false when the blend does not modify
the dst. GrGLGpu will now use glColorMask instead of blending for
these modes (dst, dst-in [Sa=1], modulate ignored for [Sc=1]).
* Converts all SA blend coeffs to One for opaque inputs, and ISA to
Zero if there is also no coverage. (We keep ISA around when there
is coverage because we use it to tweak alpha for coverage.)
* Abandons solid white optimizations for the sake of simplicity
(screen was the only mode that previous had solid white opts).
Minor differences:
* Inconsequential differences in opt flags (e.g. we now return
kCanTweakAlphaForCoverage_OptFlag even when there is no coverage).
* Src coeffs when the shader outputs 0.
* IS2C vs IS2A when the secondary output is scalar.
BUG=skia:
Review URL: https://codereview.chromium.org/1124373002
2015-05-22 11:36:57 -07:00
bsalomon
424cc26add
Remove init from GrGLContextInfo and caps classes
...
Make Gr*Caps, GrGLContext* noncopyable
Review URL: https://codereview.chromium.org/1153813002
2015-05-22 10:37:30 -07:00
bsalomon
eb1cb5c5b5
rename GrDrawTargetCaps.h to GrCaps.h and move to include
...
Review URL: https://codereview.chromium.org/1135113005
2015-05-22 08:01:09 -07:00
cdalton
0edea2c8e7
Make mixed samples contingent on auxiliary extensions
...
Moves the cap for mixed samples into GrShaderCaps and does not enable
it unless we have support for both dual source blending and
multisample disable.
Creates a dedicated cap for multisample disable.
Reconfigures the mixed samples cap to indicate the collective
capability of three different extensions:
GL_NV_framebuffer_mixed_samples
GL_NV_sample_mask_override_coverage
GL_EXT_raster_multisample
Imports tokens and procedures for GL_EXT_raster_multisample.
BUG=skia:
Review URL: https://codereview.chromium.org/1151793002
2015-05-21 08:27:44 -07:00
jvanverth
fb5df43af8
Add RGBA half float texture format.
...
BUG=skia:3829
Review URL: https://codereview.chromium.org/1148243002
2015-05-21 08:12:27 -07:00
bsalomon
4b91f768b3
rename GrDrawTargetCaps to GrCaps
...
Review URL: https://codereview.chromium.org/1133123009
2015-05-19 09:29:46 -07:00
kkinnunen
54b8511189
Make GrResourceCache perf less sensitive to key length change
...
Make GrResourceCache performance less sensitive to key length change.
The memcmp in GrResourceKey is called when SkTDynamicHash jumps the
slots to find the hash by a index. Avoid most of the memcmps by
comparing the hash first.
This is important because small changes in key data length can cause
big performance regressions. The theory is that key length change causes
different hash values. These hash values might trigger memcmps that
originally weren't there, causing the regression.
Adds few specialized benches to grresourcecache_add to test different
key lengths. The tests are run only on release, because on debug the
SkTDynamicHash validation takes too long, and adding many such delays
to development test runs would be unproductive. On release the tests
are quite fast.
Effect of this patch to the added tests on amd64:
grresourcecache_find_10 738us -> 768us 1.04x
grresourcecache_find_2 472us -> 476us 1.01x
grresourcecache_find_25 841us -> 845us 1x
grresourcecache_find_4 565us -> 531us 0.94x
grresourcecache_find_54 1.18ms -> 1.1ms 0.93x
grresourcecache_find_5 834us -> 749us 0.9x
grresourcecache_find_3 620us -> 542us 0.87x
grresourcecache_add_25 2.74ms -> 2.24ms 0.82x
grresourcecache_add_56 3.23ms -> 2.56ms 0.79x
grresourcecache_add_54 3.34ms -> 2.62ms 0.78x
grresourcecache_add_5 2.68ms -> 2.1ms 0.78x
grresourcecache_add_10 2.7ms -> 2.11ms 0.78x
grresourcecache_add_2 1.85ms -> 1.41ms 0.76x
grresourcecache_add 1.84ms -> 1.4ms 0.76x
grresourcecache_add_4 1.99ms -> 1.49ms 0.75x
grresourcecache_add_3 2.11ms -> 1.55ms 0.73x
grresourcecache_add_55 39ms -> 13.9ms 0.36x
grresourcecache_find_55 23.2ms -> 6.21ms 0.27x
On arm64 the results are similar.
On arm_v7_neon, the results lack the discontinuity at 55:
grresourcecache_add 4.06ms -> 4.26ms 1.05x
grresourcecache_add_2 4.05ms -> 4.23ms 1.05x
grresourcecache_find 1.28ms -> 1.3ms 1.02x
grresourcecache_find_56 3.35ms -> 3.32ms 0.99x
grresourcecache_find_2 1.31ms -> 1.29ms 0.99x
grresourcecache_find_54 3.28ms -> 3.24ms 0.99x
grresourcecache_add_5 6.38ms -> 6.26ms 0.98x
grresourcecache_add_55 8.44ms -> 8.24ms 0.98x
grresourcecache_add_25 7.03ms -> 6.86ms 0.98x
grresourcecache_find_25 2.7ms -> 2.59ms 0.96x
grresourcecache_find_4 1.45ms -> 1.38ms 0.95x
grresourcecache_find_10 2.52ms -> 2.39ms 0.95x
grresourcecache_find_55 3.54ms -> 3.33ms 0.94x
grresourcecache_find_5 2.5ms -> 2.32ms 0.93x
grresourcecache_find_3 1.57ms -> 1.43ms 0.91x
The extremely slow case, 55, is postulated to be due to the index jump
collisions running the memcmp. This is not visible on arm_v7_neon probably due
to hash function producing different results for 32 bit architectures.
This change is needed for extending path cache key in Gr
NV_path_rendering codepath. Extending is needed in order to add dashed
paths to the path cache.
Review URL: https://codereview.chromium.org/1132723003
2015-05-18 22:47:33 -07:00
robertphillips
eea2ff7201
Revert of Refactor GrBufferAllocPools to use resource cache (patchset #9 id:160001 of https://codereview.chromium.org/1139753002/ )
...
Reason for revert:
Perf Regression for some bot/skp combinations
Original issue's description:
> Refactor GrBufferAllocPools to use resource cache
>
> Committed: https://skia.googlesource.com/skia/+/c5f1c5414fc8f73cbefadcc1b24ec794056fa203
TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1129863008
2015-05-14 05:24:53 -07:00
robertphillips
c5f1c5414f
Refactor GrBufferAllocPools to use resource cache
...
Review URL: https://codereview.chromium.org/1139753002
2015-05-13 10:55:33 -07:00
joshualitt
6c891107ce
GLProgramsTest 3.0
...
BUG=skia:
Review URL: https://codereview.chromium.org/1139743002
2015-05-13 08:51:50 -07:00
joshualitt
7d022d6cc8
add option to supress prints on context
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/55661337667a8305ebb100e36af23d34c2fb83ba
Review URL: https://codereview.chromium.org/1128903008
2015-05-12 12:03:50 -07:00
joshualitt
ee71044d4b
Revert of add option to supress prints on context (patchset #5 id:80001 of https://codereview.chromium.org/1128903008/ )
...
Reason for revert:
breaks windows rollbots
Original issue's description:
> add option to supress prints on context
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/55661337667a8305ebb100e36af23d34c2fb83ba
TBR=bsalomon@google.com ,robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1125193006
2015-05-12 08:33:36 -07:00
joshualitt
5566133766
add option to supress prints on context
...
BUG=skia:
Review URL: https://codereview.chromium.org/1128903008
2015-05-12 07:00:57 -07:00
cdalton
321177052b
Add assignment op to enum bitfield ops
...
BUG=skia:
Review URL: https://codereview.chromium.org/1139513002
2015-05-11 11:21:23 -07:00
bsalomon
f7cc87719e
Add function for logging blend info on XP.
...
Review URL: https://codereview.chromium.org/1132373003
2015-05-11 11:21:14 -07:00
joshualitt
8e5c177c85
convex path renderer unit tests
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1134753002
2015-05-11 08:58:52 -07:00
joshualitt
e590266294
Add unit tests for stroke rects and drawVertices
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1133613004
2015-05-11 08:18:35 -07:00
joshualitt
21279c7ada
AADistanceFieldPathRenderer unit tests
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1129083005
2015-05-11 07:21:37 -07:00
egdaniel
c19cdc254c
Only discard for XP dstCopies if we have a coverage value.
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1125283005
2015-05-10 08:45:18 -07:00
bsalomon
72c7a60ecf
remove legacy Gr things
...
Review URL: https://codereview.chromium.org/1132813002
2015-05-08 07:17:05 -07:00
reed
8b26b99c97
new image from backend desc
...
BUG=485243
Review URL: https://codereview.chromium.org/1121813002
2015-05-07 15:36:18 -07:00
joshualitt
2fbd4068bd
tesselating path renderer unit tests
...
BUG=skia:
Review URL: https://codereview.chromium.org/1127183006
2015-05-07 13:06:42 -07:00
robertphillips
e40d397259
Isolate GrBufferAllocPools inside GrBatchTarget
...
This CL refactors the location of the GrBufferAllocPools so they reside entirely inside the GrBatchTarget. This is in preparation for making them use scratch resources.
Review URL: https://codereview.chromium.org/1131553002
2015-05-07 09:51:43 -07:00
joshualitt
0acd0d33fd
adding uniqueID to GrContext
...
BUG=skia:
Review URL: https://codereview.chromium.org/1128873009
2015-05-07 08:23:19 -07:00
cdalton
8917d62ef4
Implement support for KHR_blend_equation_advanced
...
Uses KHR(or NV)_blend_equation_advanced to implement custom Xfer modes
in hardware.
BUG=skia:
Review URL: https://codereview.chromium.org/1037123003
2015-05-06 13:40:21 -07:00
egdaniel
99bc9fdfb5
Remove canTweakAlphaForCoverage from XP's since batch reads flag.
...
BUG=skia:
Review URL: https://codereview.chromium.org/1127693002
2015-05-04 12:58:16 -07:00
bsalomon
ed0bcad9c8
Move instanced index buffer creation to flush time
...
Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26
Review URL: https://codereview.chromium.org/1116943004
2015-05-04 10:36:43 -07:00
bsalomon
d8ed1b64a6
Revert of Move instanced index buffer creation to flush time (patchset #6 id:100001 of https://codereview.chromium.org/1116943004/ )
...
Reason for revert:
messed up caching, recreating index buffers all the time.
Original issue's description:
> Move instanced index buffer creation to flush time
>
> Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26
TBR=joshualitt@google.com ,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1126613003
2015-05-04 10:09:24 -07:00
bsalomon
ab622c7b8c
Move instanced index buffer creation to flush time
...
Review URL: https://codereview.chromium.org/1116943004
2015-05-04 08:09:30 -07:00
joshualitt
40ded32418
Add hairlines batch unit test
...
BUG=skia:
Review URL: https://codereview.chromium.org/1119563002
2015-05-02 07:07:17 -07:00
bsalomon
d309e7aa0e
This replaces the texture creation/caching functions on GrContext with a GrTextureProvider interface. The goal is to pass this narrowly focused object in places that currently take a GrContext but don't need and shouldn't use its other methods. It also has an extended private interface for interacting with non-texture resource types.
...
Review URL: https://codereview.chromium.org/1107973004
2015-04-30 14:18:54 -07:00
joshualitt
3e708c53f7
Add batch unit tests for ovals
...
BUG=skia:
Review URL: https://codereview.chromium.org/1108403005
2015-04-30 13:49:27 -07:00
cdalton
9954bc38c4
Use texture barriers to read directly from the RT
...
Updates GrXferProcessor to read directly from the RT texture when
texture barriers are supported and it needs to know the dst color.
Also adds the notion of an Xfer barrier and uses it to issue texture
barriers when the XP will read the RT.
BUG=skia:
Review URL: https://codereview.chromium.org/1040303002
2015-04-29 14:17:00 -07:00
joshualitt
fa2008ff6e
Add dash lines batch unit test
...
BUG=skia:
Review URL: https://codereview.chromium.org/1108053004
2015-04-29 11:32:06 -07:00
jvanverth
e9c0fc616d
Pull out shader-specific caps into GrShaderCaps and GrGLSLCaps
...
BUG=skia:
Review URL: https://codereview.chromium.org/1116713002
2015-04-29 11:18:05 -07:00
joshualitt
3f655f34a2
Initial CL to create GrBatchTest infrastructure
...
BUG=skia:
Review URL: https://codereview.chromium.org/1109153004
2015-04-29 10:01:22 -07:00
bsalomon
a73239a009
Remove GrFlushToGpuDrawTarget and move functionality up to GrDrawTarget.
...
Review URL: https://codereview.chromium.org/1117433002
2015-04-28 13:35:17 -07:00
joshualitt
4eaf9cef5a
create GrTestUtils.h, move some common functions into it
...
BUG=skia:
Review URL: https://codereview.chromium.org/1117443002
2015-04-28 13:31:18 -07:00
jvanverth
cfc18867d9
Use GLSLCaps for creating processor keys and GLSL-specific programs
...
Effectively all this does is future-proof any GLSL-specific code, as
GLSLCaps is just a typedef of GLCaps.
BUG=skia:
Review URL: https://codereview.chromium.org/1109863004
2015-04-28 08:48:20 -07:00
joshualitt
8f94bb2b25
remove old text contexts and fontcache
...
BUG=skia:
Review URL: https://codereview.chromium.org/1104343003
2015-04-28 07:04:11 -07:00
kkinnunen
1899651ffc
Extract gpu line dashing to GrDashLinePathRenderer
...
Move line dashing logic from GrContext::drawPath to
GrDashLinePathRenderer. This makes it possible to let path renderers render arbitrary dashed paths.
End goal is to implement dashing in GrStencilAndCoverPathRenderer.
Review URL: https://codereview.chromium.org/1100073003
2015-04-26 23:18:50 -07:00
cdalton
f4f2b44222
Add onGetBlendInfo to GrXferProcessor
...
Adds an onGetBlendInfo method for GrXferProcessor subclasses to
override instead of overriding getBlendInfo directly. This gives the
base class a chance to initialize the struct with default values
before passing it on. As the BlendInfo struct grows, this will keep
things simple and less error prone.
BUG=skia:
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1049143002
2015-04-23 09:40:23 -07:00
cdalton
bae6f6c3ec
Add tokens and entry points for KHR_blend_equation_advanced
...
Also adds glBlendEquation, which the extension interacts with, to the
core of GrGLInterface. Validation of this function is temporarily
disabled until Chrome hooks it up.
BUG=skia:
Review URL: https://codereview.chromium.org/1039693004
2015-04-22 10:39:03 -07:00
tomhudson
2575f317d3
Revert of Add tokens and entry points for KHR_blend_equation_advanced (patchset #3 id:40001 of https://codereview.chromium.org/1039693004/ )
...
Reason for revert:
We're getting repeated crashes since this CL landed when we try to evaluate a roll into Chrome on our bots. (https://uberchromegw.corp.google.com/i/client.skia/builders/Linux%20Tests/builds/1902 )
Our initial reflex is to put a #if 0 around this code (just like the immediately following lines 334-338 in GrGLInterface.cpp), but the error isn't what the GPU team expected to see if that was all we needed, so we're reverting now and asking you to resubmit tomorrow after running more thorough tests.
Original issue's description:
> Add tokens and entry points for KHR_blend_equation_advanced
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e578859f80b46a63144add215955221017d3609
TBR=markkilgard@gmail.com ,bsalomon@google.com,cdalton@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1101593002
2015-04-21 14:16:53 -07:00
cdalton
8e578859f8
Add tokens and entry points for KHR_blend_equation_advanced
...
BUG=skia:
Review URL: https://codereview.chromium.org/1039693004
2015-04-21 12:34:09 -07:00
cdalton
fd4167ddf1
Import glTextureBarrier
...
BUG=skia:
Review URL: https://codereview.chromium.org/1090163002
2015-04-21 11:45:56 -07:00
egdaniel
8dc7c3a839
Rename GrStencilBuffer to GrStencilAttachment
...
BUG=skia:
Review URL: https://codereview.chromium.org/1083133002
2015-04-16 11:22:42 -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
joshualitt
0db6dfaeb2
The TextBlobCache needs the ability to trigger a flush because otherwise its entire budget can be used up, but it will not be able to free up any space due to blobs being stuck in the GrInOrderDrawBuffer. This was causing a segfault. After this CL the cache will try to purge, and then flush if it cannot purge enough. It will not purge the most recent addition to the cache.
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1071333002
2015-04-10 07:01:30 -07:00
bsalomon
3f324321cd
Add mechanism to proactively purge old resources in GrResourceCache.
...
This change leaves the feature turned off by default.
Review URL: https://codereview.chromium.org/1032873002
2015-04-08 11:01:55 -07:00
joshualitt
b7133bed55
Adding a cache + memory pool for GPU TextBlobs
...
BUG=skia:
Review URL: https://codereview.chromium.org/1055843002
2015-04-08 09:08:31 -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
vbuzinov
08b4d29a0a
GrGLInterface: Add support for NV_framebuffer_mixed_samples
...
Import glCoverageModulation if NV_framebuffer_mixed samples
is available
BUG=skia:3177
Review URL: https://codereview.chromium.org/993363002
2015-04-01 06:29:49 -07:00
joshualitt
7c3a2f834e
BitmapTextBatch and BitmapTextBlob
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984
Review URL: https://codereview.chromium.org/1011403004
2015-03-31 13:32:05 -07:00
joshualitt
c03391e792
Revert of BitmapTextBatch and BitmapTextBlob (patchset #18 id:360001 of https://codereview.chromium.org/1011403004/ )
...
Reason for revert:
Breaks a unit test on mac
Original issue's description:
> BitmapTextBatch and BitmapTextBlob
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984
TBR=fmalita@chromium.org ,reed@google.com,jvanverth@google.com,robertphillips@google.com,bsalomon@google.com,jvanverth@chromium.org,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1050633002
2015-03-31 11:33:08 -07:00
joshualitt
eed1dae049
BitmapTextBatch and BitmapTextBlob
...
BUG=skia:
Review URL: https://codereview.chromium.org/1011403004
2015-03-31 11:04:53 -07:00
mtklein
36352bf5e3
C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
...
NOPRESUBMIT=true
BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002
Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
joshualitt
6e8cd96719
Let text contexts fall back directly to paths
...
BUG=skia:
Review URL: https://codereview.chromium.org/1015173002
2015-03-20 10:30:14 -07:00
bsalomon
6f7f2012ee
Move GrAutoLocaleSetter to new file and fix issue with null locale
...
TBR=egdaniel@google.com
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/1002623004
2015-03-16 14:00:52 -07:00
Brian Salomon
95a4fe3737
always reset locale (not just in debug).
...
BUG=skia:
Review URL: https://codereview.chromium.org/1007283009
2015-03-16 15:36:44 -04:00
Brian Salomon
f33a8bf31e
fix ios build wrt locale?
...
BUG=skia:3330
Review URL: https://codereview.chromium.org/1012773004
2015-03-16 15:05:23 -04:00
bsalomon
3318ee7d5e
Use C locale for numerics when emitting shaders.
...
BUG=skia:3330
Review URL: https://codereview.chromium.org/1012723002
2015-03-16 11:56:29 -07:00
reed
11fa2247b7
some utils for rect and matrix
...
BUG=skia:
Review URL: https://codereview.chromium.org/1003813003
2015-03-13 06:08:28 -07:00
joshualitt
d5b98404ec
fix for valgrind preAbandonGpuContext
...
NOTREECHECKS=true
BUG=skia:
Review URL: https://codereview.chromium.org/997923002
2015-03-11 09:11:19 -07:00
bsalomon
bb3be25a86
Remove rect clip type from grclip.
...
R=joshualitt@google.com
BUG=skia:
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/989443003
2015-03-06 08:21:39 -08:00
egdaniel
bdad9c34d8
Add flag to force gpu trace markers to be used and printed out for debugging.
...
BUG=skia:
Review URL: https://codereview.chromium.org/976413002
2015-03-05 12:19:17 -08:00
joshualitt
570d2f81a6
I'd really like to land this before the branch so speedy reviews are appreciated.
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336
Review URL: https://codereview.chromium.org/936943002
2015-02-25 13:19:48 -08:00
joshualitt
2907059d0e
Revert of Pass clip to context (patchset #8 id:180001 of https://codereview.chromium.org/936943002/ )
...
Reason for revert:
Strange blur problems on nexus 5
Original issue's description:
> I'd really like to land this before the branch so speedy reviews are appreciated.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336
TBR=jvanverth@google.com ,senorblanco@google.com,bsalomon@google.com,senorblanco@chromium.org,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/956083002
2015-02-25 13:04:44 -08:00
joshualitt
586d5d640b
I'd really like to land this before the branch so speedy reviews are appreciated.
...
BUG=skia:
Review URL: https://codereview.chromium.org/936943002
2015-02-25 11:21:21 -08:00
joshualitt
ab2f44cbfa
probable fix for asan bot
...
NOTREECHECKS=True
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/956583002
2015-02-24 06:47:14 -08:00
joshualitt
0413d43e1b
Enable rect clips
...
BUG=skia:
Review URL: https://codereview.chromium.org/951653002
2015-02-23 17:52:51 -08:00
joshualitt
9ece6a9548
move static init to cpp file to fix linux builder
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/947933004
2015-02-23 17:03:33 -08:00
joshualitt
128def3900
Revert of fix for linux builder warn on exit destructor (patchset #1 id:1 of https://codereview.chromium.org/951103002/ )
...
Reason for revert:
still breaks
Original issue's description:
> fix for linux builder warn on exit destructor
>
> TBR=bsalomon@google.com
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/51fdb4f8f63b6bb13e719000381e225503a2d4a0
TBR=joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/955493003
2015-02-23 16:19:22 -08:00
joshualitt
51fdb4f8f6
fix for linux builder warn on exit destructor
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/951103002
2015-02-23 15:57:23 -08:00
joshualitt
44701df5ce
Move clip off of draw target
...
BUG=skia:
Review URL: https://codereview.chromium.org/947443003
2015-02-23 14:44:58 -08:00
egdaniel
0bdeec9640
Remove canApplyCoverage from XP and all related functions in gpu code.
...
BUG=skia:
Review URL: https://codereview.chromium.org/919683002
2015-02-23 12:12:54 -08:00
bsalomon
93276c683d
Remove EGL header from SkANGLELContext.h
...
TBR=egdaniel@google.com
Review URL: https://codereview.chromium.org/947263002
2015-02-23 10:51:13 -08:00
bsalomon
c01f47b759
Remove unnecessary include of gles2 header in SkANGLEGLContext.h
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/949973002
2015-02-23 10:06:44 -08:00
bsalomon
6bc1b5fab8
Dynamically create stencil buffer when needed.
...
Review URL: https://codereview.chromium.org/938383004
2015-02-23 09:06:38 -08:00
bsalomon
42380174ca
Use D3D11 backend for ANGLE when available.
...
Review URL: https://codereview.chromium.org/954453002
2015-02-23 08:57:23 -08:00
bsalomon
f99e961f55
Allow resources' unique keys to be changed.
...
Review URL: https://codereview.chromium.org/938943002
2015-02-19 08:24:16 -08:00
bsalomon
8718aafec2
Rename GrContentKey to GrUniqueKey
...
Review URL: https://codereview.chromium.org/940463006
2015-02-19 07:24:21 -08:00
joshualitt
25d9c15408
Pass Rendertarget into context.
...
Adding Jim for text context stuff, and Steven for image blur stuff.
BUG=skia:
Review URL: https://codereview.chromium.org/939623005
2015-02-18 12:29:52 -08:00
jvanverth
5a105ff053
Use uint16s for texture coordinates when rendering text.
...
Allows us to push more vertices into a given vertex buffer, with
a slight performance improvement.
Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b
Review URL: https://codereview.chromium.org/917373002
2015-02-18 11:36:35 -08:00
bsalomon
0aa94798c9
Use SkAutoSTMalloc in GrResourceKey
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/935863003
2015-02-18 11:33:04 -08:00
reed
e4ef1ca5be
Revert of Use uint16s for texture coordinates when rendering text. (patchset #5 id:80001 of https://codereview.chromium.org/917373002/ )
...
Reason for revert:
speculative revert for DEPS failures
https://codereview.chromium.org/932973002/
Original issue's description:
> Use uint16s for texture coordinates when rendering text.
>
> Allows us to push more vertices into a given vertex buffer, with
> a slight performance improvement.
>
> Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b
TBR=joshualitt@google.com ,robertphillips@google.com,bsalomon@google.com,reed@google.com,djsollen@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/920333003
2015-02-17 18:38:38 -08:00
bsalomon
f320e04c50
Use an array of nonpurgeable resources in GrResourceCache
...
Review URL: https://codereview.chromium.org/932863004
2015-02-17 15:09:34 -08:00
bsalomon
9f2d1571ed
Make GrResourceCache use a priority queue of purgeable resources.
...
Review URL: https://codereview.chromium.org/921323002
2015-02-17 11:47:41 -08:00
egdaniel
3ad6570e94
Use dst copies in porter duffer XP to correctly render certain blends.
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/997c6358d94e188b1a7b89a4f86e24cbe0f5a164
Review URL: https://codereview.chromium.org/914003003
2015-02-17 11:15:47 -08:00
jvanverth
059034d252
Use uint16s for texture coordinates when rendering text.
...
Allows us to push more vertices into a given vertex buffer, with
a slight performance improvement.
Review URL: https://codereview.chromium.org/917373002
2015-02-17 08:39:56 -08:00
egdaniel
b197b8ff31
Use SkXfermode as public facing enum for GrPorterDuffXP
...
BUG=skia:
Review URL: https://codereview.chromium.org/926593005
2015-02-17 07:34:43 -08:00
joshualitt
43466a1ade
Multi-string shaders
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/1c3c2d83364ee228e0751df0e1b9c161c0ba8c1e
Review URL: https://codereview.chromium.org/929503002
2015-02-13 17:18:27 -08:00
joshualitt
b8a82f2bce
Revert of Multi-string shaders (patchset #4 id:60001 of https://codereview.chromium.org/929503002/ )
...
Reason for revert:
windows warnings
Original issue's description:
> Multi-string shaders
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1c3c2d83364ee228e0751df0e1b9c161c0ba8c1e
TBR=bsalomon@google.com ,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/924973002
2015-02-13 16:31:46 -08:00
joshualitt
1c3c2d8336
Multi-string shaders
...
BUG=skia:
Review URL: https://codereview.chromium.org/929503002
2015-02-13 16:23:49 -08:00
bsalomon
3582d3ee9f
Split out methods in GrGpuResource::CacheAccess that can be called outside of the cache.
...
Review URL: https://codereview.chromium.org/923143002
2015-02-13 14:20:05 -08:00
egdaniel
f7c2d55872
Determine whether we can tweakAlphaForCoverage during Pipeline/XP creation.
...
BUG=skia:
Review URL: https://codereview.chromium.org/927623002
2015-02-13 12:11:00 -08:00
egdaniel
2b816bacc0
Revert of Use dst copies in porter duffer XP to correctly render certain blends. (patchset #4 id:60001 of https://codereview.chromium.org/914003003/ )
...
Reason for revert:
Failing GLProgramTest passing in stupid coeffs
Original issue's description:
> Use dst copies in porter duffer XP to correctly render certain blends.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/997c6358d94e188b1a7b89a4f86e24cbe0f5a164
TBR=bsalomon@google.com ,joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/923153003
2015-02-13 11:07:54 -08:00
egdaniel
997c6358d9
Use dst copies in porter duffer XP to correctly render certain blends.
...
BUG=skia:
Review URL: https://codereview.chromium.org/914003003
2015-02-13 10:23:19 -08:00
egdaniel
e36914cb20
Pass in ProcOptInfos into willNeedDstCopy on XPs
...
BUG=skia:
Review URL: https://codereview.chromium.org/912413002
2015-02-13 09:00:33 -08:00
bsalomon
3740972d02
Make null GL context use callback to make current
...
Review URL: https://codereview.chromium.org/919783002
2015-02-11 14:19:18 -08:00
bsalomon
bb0502eec5
Support multiple null GL contexts on a thread.
...
This has the side effect of requiring SkNullGLContext to use the null GL interface.
It exposes SkNullGLContext and also removes null context support from SampleApp.
Review URL: https://codereview.chromium.org/916733002
2015-02-11 11:11:11 -08:00
bsalomon
0ea80f43a1
Rename GrResourceCache2->GrResourceCache
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/921453002
2015-02-11 10:49:59 -08:00
robertphillips
e85a32d4f8
Clean up clipping code a bit
...
Review URL: https://codereview.chromium.org/913693002
2015-02-10 08:16:55 -08:00
egdaniel
41d4f09356
Move GrXferProcessor subclasses into cpp files
...
BUG=skia:
Review URL: https://codereview.chromium.org/860383007
2015-02-09 07:51:00 -08:00
bsalomon
23e619cf46
Reimplement gpu message bus for invalidated bitmap gen IDs
...
Review URL: https://codereview.chromium.org/902873002
2015-02-06 11:54:28 -08:00
bsalomon
d0423587ac
One createTexture function, attempt to recycle scratch in createTexture.
...
Review URL: https://codereview.chromium.org/864383003
2015-02-06 08:49:24 -08:00
bsalomon
50785a3d10
Revert of Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #1 id:1 of https://codereview.chromium.org/901663007/ )
...
Reason for revert:
The revert didn't help the 10.9 bot. Unreverting by reverting the revert (which is basically relanding the original patch which itself was a revert of a revert). Revert.
Original issue's description:
> Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #11 id:200001 of https://codereview.chromium.org/885923002/ )
>
> Reason for revert:
> Testing to see if reverting fixes 10.9 bots.
>
> Original issue's description:
> > Move DstCopy on gpu into the GrXferProcessor.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
> >
> > Committed: https://skia.googlesource.com/skia/+/5e1378d0e075a323144ba14e0a4cbcca35eccc69
>
> TBR=joshualitt@google.com ,egdaniel@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/21b2c53218ab25f4268e3992e51d916076a2a7ee
TBR=joshualitt@google.com ,egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/873723009
2015-02-06 07:02:37 -08:00
bsalomon
21b2c53218
Revert of Move DstCopy on gpu into the GrXferProcessor. (patchset #11 id:200001 of https://codereview.chromium.org/885923002/ )
...
Reason for revert:
Testing to see if reverting fixes 10.9 bots.
Original issue's description:
> Move DstCopy on gpu into the GrXferProcessor.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
>
> Committed: https://skia.googlesource.com/skia/+/5e1378d0e075a323144ba14e0a4cbcca35eccc69
TBR=joshualitt@google.com ,egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/901663007
2015-02-05 14:18:05 -08:00
egdaniel
5e1378d0e0
Move DstCopy on gpu into the GrXferProcessor.
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/74a11753604768bf461b80cabb66060e8564d82c
Review URL: https://codereview.chromium.org/885923002
2015-02-05 11:11:13 -08:00
joshualitt
de358a9946
BUG=skia:
...
Review URL: https://codereview.chromium.org/894693003
2015-02-05 08:19:35 -08:00
bsalomon
d2a6f4e419
More cleanup around GrContext, textures, and SkGr.cpp
...
Review URL: https://codereview.chromium.org/880983008
2015-02-04 10:55:54 -08:00
egdaniel
4dce32c466
Revert "Move DstCopy on gpu into the GrXferProcessor."
...
This reverts commit 74a1175360
.
TBR=joshualitt@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd
Review URL: https://codereview.chromium.org/896163003
2015-02-04 06:25:28 -08:00
egdaniel
7adb355594
Revert of Revert "Move DstCopy on gpu into the GrXferProcessor." (patchset #1 id:1 of https://codereview.chromium.org/896163003/ )
...
Reason for revert:
failed on my manual revert
Original issue's description:
> Revert "Move DstCopy on gpu into the GrXferProcessor."
>
> This reverts commit 74a1175360
.
>
> TBR=joshualitt@google.com ,bsalomon@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3e9dfdb3784c0cbfecf7589a74aa9aff7ef40abd
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/900913002
2015-02-04 06:20:25 -08:00
egdaniel
3e9dfdb378
Revert "Move DstCopy on gpu into the GrXferProcessor."
...
This reverts commit 74a1175360
.
TBR=joshualitt@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/896163003
2015-02-04 06:14:22 -08:00
kkinnunen
2340dcb02c
Remove unused and unimplemented abstract functions from GrRenderTarget
...
Remove unused and unimplemented abstract functions from GrRenderTarget.
The functions might cause confusion later.
BUG=skia:3388
Review URL: https://codereview.chromium.org/865603007
2015-02-03 22:20:19 -08:00
egdaniel
74a1175360
Move DstCopy on gpu into the GrXferProcessor.
...
BUG=skia:
Review URL: https://codereview.chromium.org/885923002
2015-02-03 15:02:43 -08:00
mtklein
b9eb4ac0f1
patch from issue 886233004 at patchset 40001 ( http://crrev.com/886233004#ps40001 )
...
... with changes proposed in the review.
BUG=skia:
Review URL: https://codereview.chromium.org/894013002
2015-02-02 18:26:03 -08:00
bsalomon
563ff60b33
make getContentKey() available in GrGpuResource public interface
...
TBR=robertphillips@google.com
Committed: https://skia.googlesource.com/skia/+/85ed2db092e75db41b711b9116a8d5b465fc2b0c
Review URL: https://codereview.chromium.org/886313005
2015-02-02 17:25:26 -08:00
stephana
9b440260d5
Revert of make getContentKey() available in GrGpuResource public interface (patchset #2 id:20001 of https://codereview.chromium.org/886313005/ )
...
Reason for revert:
This causes in one case the linker and in the other the compiler to segfault. On
Test-Ubuntu12-ShuttleA-GTX660-x86_64-Debug/Release
Original issue's description:
> make getContentKey() available in GrGpuResource public interface
>
> TBR=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/85ed2db092e75db41b711b9116a8d5b465fc2b0c
TBR=robertphillips@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/864343005
2015-02-02 14:52:11 -08:00
bsalomon
85ed2db092
make getContentKey() available in GrGpuResource public interface
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/886313005
2015-02-02 14:08:09 -08:00
bsalomon
37f9a2694c
Move npot resizing out of GrContext and simplify GrContext texture functions.
...
Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0
Review URL: https://codereview.chromium.org/882223003
2015-02-02 13:00:10 -08:00
bsalomon
e137db8569
Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (patchset #10 id:200001 of https://codereview.chromium.org/882223003/ )
...
Reason for revert:
perf fix didn't fix the cr webgl conformance tests
Original issue's description:
> Move npot resizing out of GrContext and simplify GrContext texture functions.
>
> Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
>
> Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0
TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/887303002
2015-01-31 20:10:56 -08:00
bsalomon
6c96672491
Move npot resizing out of GrContext and simplify GrContext texture functions.
...
Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
Review URL: https://codereview.chromium.org/882223003
2015-01-31 19:27:53 -08:00
fmalita
6bfef2dfec
Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (patchset #9 id:160001 of https://codereview.chromium.org/882223003/ )
...
Reason for revert:
webGL conformance failures:
WebglConformance.conformance_textures_tex_image_and_sub_image_2d_with_video
WebglConformance.conformance_textures_texture_npot_video
https://codereview.chromium.org/892773003/
http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/29272
Original issue's description:
> Move npot resizing out of GrContext and simplify GrContext texture functions.
>
> Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
TBR=robertphillips@google.com ,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/868233005
2015-01-31 07:02:18 -08:00
bsalomon
8a81003491
Move npot resizing out of GrContext and simplify GrContext texture functions.
...
Review URL: https://codereview.chromium.org/882223003
2015-01-30 12:43:44 -08:00
bsalomon
3bd12efdcf
Fix wrapped content keys for npot textures.
...
Review URL: https://codereview.chromium.org/879193002
2015-01-28 11:39:48 -08:00
bsalomon
e167f9660c
Fix GPU resource cache related assertions.
...
Review URL: https://codereview.chromium.org/879963003
2015-01-27 09:56:04 -08:00
bsalomon
63c992f6c0
Fix the speeling of "purgeable" in Gr code
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/874693002
2015-01-23 12:47:59 -08:00
bsalomon
c2f35b750a
Allow unbudgeted resources to be recycled by the cache as scratch.
...
Review URL: https://codereview.chromium.org/870743002
2015-01-23 07:19:22 -08:00
bsalomon
4dffede04a
Fix self assigment in GrResourceKey
...
TBR=robertphillips@google.com
BUG=skia:3340
Review URL: https://codereview.chromium.org/866263007
2015-01-23 07:17:55 -08:00
bsalomon
1ea1ebce10
Remove GrBinHashKey
...
Review URL: https://codereview.chromium.org/861323002
2015-01-23 06:46:16 -08:00
bsalomon
24db3b1c35
Add specialized content key class for resources.
...
Review URL: https://codereview.chromium.org/858123002
2015-01-23 04:24:05 -08:00
egdaniel
8dd688b756
Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder
...
BUG=skia:
Review URL: https://codereview.chromium.org/858343002
2015-01-22 10:16:09 -08:00
joshualitt
2fdeda0498
XPFactory lazily initializie in drawstate / GrPaint
...
BUG=skia:
Review URL: https://codereview.chromium.org/866573002
2015-01-22 07:11:45 -08:00
bsalomon
1c60dfe7ca
Reland https://codereview.chromium.org/860333002 with fix for test failures.
...
Revert "Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/ )"
This reverts commit 988018c817
.
BUG=skia:
Review URL: https://codereview.chromium.org/863983003
2015-01-21 09:32:40 -08:00
mtklein
988018c817
Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/ )
...
Reason for revert:
Our Valgrind bot just spewed out a weird error. I don't know if it's related, but it looks at least like one of the stacks was in the right area, so I'm going to revert this precautionarily. Sorry if this is a false positive.
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/266/steps/dm/logs/stdio
Original issue's description:
> Make GrScratchKey memory buffer correct size on copy
>
> Scratch key memory buffer of a copy of a key was too big. The (new) copy
> was N times uint32_t bytes instead of N bytes.
>
> Adds few tests to resource cache. These tests would not catch the too
> big buffer. This is just a precaution for too small buffers. The main
> idea of the test change is that the scratch key should contain some
> information, so that lookup with a scratch key can also return no
> match. Otherwise testing of scratch lookup result is not indicative of
> correct code (eg. no-information scratch key will always match).
>
> Committed: https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2
TBR=bsalomon@google.com ,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/864833003
2015-01-21 08:05:55 -08:00
kkinnunen
711ef48313
Make GrScratchKey memory buffer correct size on copy
...
Scratch key memory buffer of a copy of a key was too big. The (new) copy
was N times uint32_t bytes instead of N bytes.
Adds few tests to resource cache. These tests would not catch the too
big buffer. This is just a precaution for too small buffers. The main
idea of the test change is that the scratch key should contain some
information, so that lookup with a scratch key can also return no
match. Otherwise testing of scratch lookup result is not indicative of
correct code (eg. no-information scratch key will always match).
Review URL: https://codereview.chromium.org/860333002
2015-01-21 06:39:14 -08:00
egdaniel
71e236c03e
Remove willReadDst from GrFragmentProcessor.
...
Since only XP's can read dst now, there is no reason to have this query on GrFP.
This also triggered a chain reaction of cleaning up/removing unnecessary code
elsewhere.
BUG=skia:
Review URL: https://codereview.chromium.org/851143003
2015-01-20 06:34:51 -08:00
robertphillips
46d36f0e7b
Refactor position computation to enable device space "nudge"
...
To match raster's handling of BW geometry we want to be able to perform a device space "nudge" on all geometry. This CL sets us up to be able to do that in GrGLVertexBuilder::transformToNormalizedDeviceSpace.
BUG=423834
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/854013002
2015-01-18 08:14:14 -08:00
bsalomon
afe3005be3
Require budget decision when creating a RenderTarget SkSurface.
...
Restructure SkGpuDevice creation:
*SkSurfaceProps are optional.
*Use SkSurfaceProps to communicate DF text rather than a flag.
*Tell SkGpuDevice::Create whether RT comes from cache or not.
Review URL: https://codereview.chromium.org/848903004
2015-01-16 07:32:33 -08:00
egdaniel
54f0e9d784
Add Xfer Processor for GrCustomXfermodes
...
BUG=skia:
Review URL: https://codereview.chromium.org/852203003
2015-01-16 06:29:47 -08:00
egdaniel
0063a9b69a
Move XferEffects class to GrCustomXfermode file
...
BUG=skia:
Review URL: https://codereview.chromium.org/844913003
2015-01-15 10:52:32 -08:00
bsalomon
5236cf480d
Make uncached textures uncached from the get go.
...
This avoids the problem of a newly created uncached texture causing a purge of cached resources.
BUG=chromium:445885
Review URL: https://codereview.chromium.org/846303002
2015-01-14 10:42:08 -08:00
joshualitt
abb52a1a70
Move most of the transform logic into the primitive processors
...
BUG=skia:
Review URL: https://codereview.chromium.org/822423004
2015-01-13 15:02:10 -08:00
mtklein
6f07665768
Simplify SkInstCnt
...
This code requires fewer macros to use it (just one), has less code in macro
definitions, and has simpler synchronization code (just atomic ints, no SkOnce,
no SkMutex, etc.)
A minor downside, we lose indentation and reverse-ordering in the final report:
Leaked SkRefCntBase: 7
Leaked SkFontMgr: 1
Leaked SkWeakRefCnt: 1
Leaked SkTypeface: 1
Leaked SkFlattenable: 3
Leaked SkXfermode: 3
Leaked SkPathRef: 1
Leaked SkPixelRef: 1
Leaked SkMallocPixelRef: 1
becomes
Leaked SkXfermode: 3
Leaked SkMallocPixelRef: 1
Leaked SkPixelRef: 1
Leaked SkPathRef: 1
Leaked SkFlattenable: 3
Leaked SkTypeface: 1
Leaked SkWeakRefCnt: 1
Leaked SkFontMgr: 1
Leaked SkRefCntBase: 7
This is motivated by wanting to land https://codereview.chromium.org/806473006/ ,
which makes sure all static use of SkOnce are in global scope. The current
implementation of SkInstCnt uses them in function scope, which isn't safe.
BUG=skia:
No public API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/841263004
2015-01-13 08:22:44 -08:00
mtklein
72c9faab45
Fix up all the easy virtual ... SK_OVERRIDE cases.
...
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.
for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end
BUG=skia:
Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
bsalomon
7775c85611
Add a simpler key type for scratch resource keys.
...
BUG=skia:2889
Review URL: https://codereview.chromium.org/815833004
2014-12-30 12:50:52 -08:00
joshualitt
8059eb9f6e
Move ViewMatrix off of drawstate
...
BUG=skia:
Review URL: https://codereview.chromium.org/815553003
2014-12-29 15:10:07 -08:00
joshualitt
40d4bd8daf
removing coord change matrices
...
BUG=skia:
Review URL: https://codereview.chromium.org/821243003
2014-12-29 09:04:40 -08:00
bsalomon
b0ae649b7e
Add device space skshader GM to test kDevice_GrCoordSet
...
Review URL: https://codereview.chromium.org/816003002
2014-12-29 07:05:27 -08:00
joshualitt
8fc6c2d82c
This CL cleans up the last remaining users of localCoordChange on paint
...
NOTREECHECKS=True
BUG=skia:
Review URL: https://codereview.chromium.org/817853002
2014-12-22 15:27:05 -08:00
jvanverth
fa1e8a7cef
Add sRGB texture support.
...
Review URL: https://codereview.chromium.org/791823003
2014-12-22 08:31:49 -08:00
egdaniel
080e673b10
Add XP to handle the cases where we disable color write.
...
BUG=skia:
Review URL: https://codereview.chromium.org/787233003
2014-12-22 07:35:52 -08:00
reed
f65f0b92f5
remove dead SK_SUPPORT_LEGACY_GRTYPES dead
...
BUG=skia:
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/823503002
2014-12-21 11:52:15 -08:00
joshualitt
290c09b8bb
initial changes to add local matrix to primitive processor
...
BUG=skia:
Review URL: https://codereview.chromium.org/820523002
2014-12-19 13:45:20 -08:00
joshualitt
c2625821b3
Remove the low hanging fruit with coord change matrices
...
BUG=skia:
Review URL: https://codereview.chromium.org/793013003
2014-12-18 16:40:55 -08:00
egdaniel
9e4ecdc9f8
Add an InvariantOutput for the XPF.
...
The Invariant output holds information about final post blended color and other
general information like will it blend with dst. Having this new struct allowed
me to also remove some functions that were previously querying subsets of the
invariant output.
BUG=skia:
Review URL: https://codereview.chromium.org/814933002
2014-12-18 12:44:55 -08:00
bsalomon
309d4d5909
Remove GrCoordTransform::kPosition_CoordSet
...
Review URL: https://codereview.chromium.org/811373002
2014-12-18 10:17:45 -08:00
joshualitt
16b2789895
Change to create device coord coordset
...
BUG=skia:
Review URL: https://codereview.chromium.org/812063002
2014-12-18 07:47:17 -08:00
joshualitt
5531d51ce7
remove view matrix from context
...
BUG=skia:
Review URL: https://codereview.chromium.org/808703006
2014-12-17 15:50:11 -08:00
bsalomon
3e79124a69
Stop creating GrODS for stencilPath commands.
...
Review URL: https://codereview.chromium.org/816513003
2014-12-17 13:43:13 -08:00
egdaniel
8750924a14
Add Coverage Drawing XP
...
BUG=skia:
Review URL: https://codereview.chromium.org/808813002
2014-12-17 13:37:13 -08:00
joshualitt
9b98932ada
This change will ultimately pull uniform color, and to a much lesser degree uniform coverage, into GPs. There are still some loose ends because drawstate has the ability to override the GP, but fixing these cleanly will have to wait until we have deferred geometry in place and can make attribute / uniform decisions on the fly.
...
BUG=skia:
Review URL: https://codereview.chromium.org/746423007
2014-12-15 14:16:27 -08:00
egdaniel
54160f3286
Add xp optimization for RGB coverage.
...
This is needed since clearColorStages is being changed to ignore color input. For RGB coverage,
we want to clear all the color stages (since we know the final output color), but we don't want
to ignore the color input since it is needed.
In future we will change this so the XP stores the color internally and thus can tell the GP to
simiply ignore color.
BUG=skia:
Review URL: https://codereview.chromium.org/791933006
2014-12-15 12:38:53 -08:00
tfarina
912ed6ebb8
Cleanup: Mark some overridden methods with 'SK_OVERRIDE'.
...
This fixes errors like this:
../../include/gpu/effects/GrPorterDuffXferProcessor.h:27:25: error:
'name' overrides a member function but is not marked 'override'
[-Werror,-Winconsistent-missing-override]
BUG=skia:3075
TEST=ninja -C out/Debug skia_lib
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/804813002
2014-12-14 15:20:11 -08:00
joshualitt
56995b5cc0
Remove GP from drawstate, revision of invariant output for GP
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/c6bc58eded89b0c0a36b8e20e193c200f297a0da
Review URL: https://codereview.chromium.org/791743003
2014-12-11 15:44:02 -08:00
junov
5756aff409
Adding a custom data field to GrGpuResource
...
Motivation: allow Blink to track pre-existing mailbox names for
textures that are recycled by the ganesh scratch texture pool.
BUG=440462
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/796163002
2014-12-11 14:59:32 -08:00
egdaniel
c230414861
Create xfer processor backend.
...
This includes:
-Having an actual XP stage at the end of the gl pipeline.
-All Blending work is handled by XP until actually setting GL blend states
-GLPrograms test to test XP
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904
Review URL: https://codereview.chromium.org/764643004
2014-12-11 13:15:14 -08:00
junov
436293a330
Making GrGpuResource::release public for special case in Blink
...
BUG=440462
Review URL: https://codereview.chromium.org/739383006
2014-12-11 10:32:32 -08:00
joshualitt
294738268d
Revert of Create xfer processor backend. (patchset #6 id:100001 of https://codereview.chromium.org/764643004/ )
...
Reason for revert:
CL breaks windows DM
Original issue's description:
> Create xfer processor backend.
>
> This includes:
> -Having an actual XP stage at the end of the gl pipeline.
> -All Blending work is handled by XP until actually setting GL blend states
> -GLPrograms test to test XP
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4dffc940c430eec66d4707490eace19c9b3f7904
TBR=bsalomon@google.com ,joshualitt@chromium.org,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/789343002
2014-12-10 15:03:01 -08:00
joshualitt
06f019fc0f
Revert of Fix to set correct output type when blending when we've read dst (patchset #4 id:60001 of https://codereview.chromium.org/791143002/ )
...
Reason for revert:
Breaks DM on windows
Original issue's description:
> Fix to set correct output type when blending when we've read dst
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/733fc2054044377e914559fa4f46db66ab7d9cea
TBR=bsalomon@google.com ,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/795783002
2014-12-10 14:57:50 -08:00
joshualitt
8c0f615fdd
Revert of Remove GP from drawstate, revision of invariant output for GP (patchset #9 id:160001 of https://codereview.chromium.org/791743003/ )
...
Reason for revert:
breaks mac
Original issue's description:
> Remove GP from drawstate, revision of invariant output for GP
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c6bc58eded89b0c0a36b8e20e193c200f297a0da
TBR=bsalomon@google.com ,egdaniel@google.com,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/794843002
2014-12-10 14:12:22 -08:00
joshualitt
c6bc58eded
Remove GP from drawstate, revision of invariant output for GP
...
BUG=skia:
Review URL: https://codereview.chromium.org/791743003
2014-12-10 13:48:57 -08:00
egdaniel
733fc20540
Fix to set correct output type when blending when we've read dst
...
BUG=skia:
Review URL: https://codereview.chromium.org/791143002
2014-12-10 12:45:20 -08:00
egdaniel
4dffc940c4
Create xfer processor backend.
...
This includes:
-Having an actual XP stage at the end of the gl pipeline.
-All Blending work is handled by XP until actually setting GL blend states
-GLPrograms test to test XP
BUG=skia:
Review URL: https://codereview.chromium.org/764643004
2014-12-10 07:43:50 -08:00
joshualitt
2e3b3e369d
This cl moves color and coverage off of drawstate. In an effort to keep this CL manageable, I have left the compute invariant input / output in a bit of a strange state(fixing this will be complicated).
...
In addition, NVPR makes this very complicated, and I haven't quite figured out a good way to handle it, so for now color and coverage DO live on optstate, but I will figure out some way to refactor that in future CLs.
BUG=skia:
Review URL: https://codereview.chromium.org/783763002
2014-12-09 13:31:15 -08:00
egdaniel
9513143efa
Make all blending up to GrOptDrawState be handled by the xp/xp factory.
...
In this cl the blending information is extracted for the xp and stored in the ODS
which is then used as it currently is. In the follow up cl, an XP backend will be added
and at that point all blending work will take place inside XP's.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/7c66342a399b529634bed0fabfaa562db2c0dbd4
Review URL: https://codereview.chromium.org/759713002
2014-12-09 11:15:44 -08:00
bsalomon
9f876a37d8
Use threshold of 1 texture coord value per pixel w/ nearest neighbor.
...
Review URL: https://codereview.chromium.org/787873002
2014-12-09 10:51:07 -08:00
egdaniel
309e346744
Rename CustomCoordTextureEffect to GrBitmapTextGeoProc.
...
Also add in explicit set for LCD text in invariantOutput.
BUG=skia:
Review URL: https://codereview.chromium.org/786293002
2014-12-09 10:35:58 -08:00
bsalomon
422f56f6e5
Make addUniform take a precision
...
Review URL: https://codereview.chromium.org/788733003
2014-12-09 10:18:12 -08:00
bsalomon
c0bd6484f6
Move shader precision out of GrShaderVar
...
Review URL: https://codereview.chromium.org/777443003
2014-12-09 10:04:14 -08:00
bsalomon
17168df779
Use texture size to determine precision of texture coord varyings.
...
Review URL: https://codereview.chromium.org/778783002
2014-12-09 09:00:49 -08:00
egdaniel
8d95ffa497
Revert of Make all blending up to GrOptDrawState be handled by the xp/xp factory. (patchset #7 id:140001 of https://codereview.chromium.org/759713002/ )
...
Reason for revert:
break many gm's
Original issue's description:
> Make all blending up to GrOptDrawState be handled by the xp/xp factory.
>
> In this cl the blending information is extracted for the xp and stored in the ODS
> which is then used as it currently is. In the follow up cl, an XP backend will be added
> and at that point all blending work will take place inside XP's.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7c66342a399b529634bed0fabfaa562db2c0dbd4
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/766653008
2014-12-08 13:26:43 -08:00
egdaniel
4ccf0b9405
Fix GrUnPreMulColor.
...
Current version incorrectly unpacked the resulting sk unpremulled color into rgba.
BUG=skia:3208
Review URL: https://codereview.chromium.org/787713002
2014-12-08 12:35:16 -08:00
egdaniel
7c66342a39
Make all blending up to GrOptDrawState be handled by the xp/xp factory.
...
In this cl the blending information is extracted for the xp and stored in the ODS
which is then used as it currently is. In the follow up cl, an XP backend will be added
and at that point all blending work will take place inside XP's.
BUG=skia:
Review URL: https://codereview.chromium.org/759713002
2014-12-08 11:20:40 -08:00
jvanverth
28f9c606e4
Add support for half float alpha textures.
...
This allows us to create distance field textures with better precision,
which may help text quality.
BUG=skia:3103
Review URL: https://codereview.chromium.org/762923003
2014-12-05 13:06:35 -08:00
egdaniel
915187b71d
Check XpFactory equality in DrawState
...
BUG=skia:
Review URL: https://codereview.chromium.org/767873006
2014-12-05 12:58:28 -08:00
egdaniel
8bf2bd335f
Move GrPorterDuffXferProcessor to include/gpu/effects.
...
BUG=skia:
Review URL: https://codereview.chromium.org/780263003
2014-12-05 12:14:27 -08:00
bsalomon
c92aadcf9a
clean up default precision handling
...
R=joshualitt@google.com
Review URL: https://codereview.chromium.org/766753006
2014-12-04 13:02:47 -08:00
joshualitt
eb2a676165
Remove backend factories
...
BUG=skia:
Review URL: https://codereview.chromium.org/778453002
2014-12-04 11:35:34 -08:00
joshualitt
87f48d997e
create and thread batch tracker object
...
I remove the factory on the next CL
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/c3a6eb23483e5d28073b509a5f637f41660de294
Review URL: https://codereview.chromium.org/772513002
2014-12-04 10:41:40 -08:00
joshualitt
841a6b54c1
Revert of create and thread batch tracker object (patchset #9 id:160001 of https://codereview.chromium.org/772513002/ )
...
Reason for revert:
Breaking linux layout test
Original issue's description:
> create and thread batch tracker object
>
> I remove the factory on the next CL
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c3a6eb23483e5d28073b509a5f637f41660de294
TBR=bsalomon@google.com ,joshualitt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/774133003
2014-12-04 06:00:41 -08:00
joshualitt
c3a6eb2348
create and thread batch tracker object
...
I remove the factory on the next CL
BUG=skia:
Review URL: https://codereview.chromium.org/772513002
2014-12-03 15:34:20 -08:00
egdaniel
c016fb8f9f
Use static XPF for porter duff xp factories.
...
BUG=skia:
Review URL: https://codereview.chromium.org/776843004
2014-12-03 11:41:55 -08:00
bsalomon
ee64d6ef49
Add glGetShaderPrecisionFormat
...
Review URL: https://codereview.chromium.org/778703003
2014-12-03 10:46:08 -08:00
egdaniel
378092f3d1
Add XferProcessor factory in GrPaint and GrDrawState.
...
In this CL the XP should have zero effect on the actual rendering pipeline.
BUG=skia:
Review URL: https://codereview.chromium.org/751283002
2014-12-03 10:40:13 -08:00