Commit Graph

17478 Commits

Author SHA1 Message Date
reed
884e97cb04 change internals over to SkPixmap and stop using accessBitmap
BUG=skia:

Review URL: https://codereview.chromium.org/1155443004
2015-05-26 11:31:54 -07:00
bsalomon
6a44c6a7d8 Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names.
Committed: https://skia.googlesource.com/skia/+/bb106b5f6ee18f7453b63f3a95f421b60a957f39

Review URL: https://codereview.chromium.org/1132093004
2015-05-26 09:49:05 -07:00
joshualitt
36ec383c57 Reorder across clears
BUG=skia:

Review URL: https://codereview.chromium.org/1161643002
2015-05-26 09:33:48 -07:00
halcanary
43315bbe4b sync-and-gyp: make smarter
This fixes two issues: If gyp is run with the CXX and CC environment
variables set, it will produce different ninja build files.
sync-and-gyp now tracks the values of those variables; if they change,
re-run gyp.

Secondly, we introduced find.py, which is used inside gyp files.  If
the contents of certain directories changes, gyp should be re-run.  So
now we track those directories too.

Review URL: https://codereview.chromium.org/1153083002
2015-05-26 08:01:19 -07:00
stephana
340cd84c9c Disabling ~path_hairline in iOS nanobench
Temporary measure to make nanobench succeed.

TBR=borenet
BUG=skia:

Review URL: https://codereview.chromium.org/1144173004
2015-05-26 06:19:11 -07:00
reed
cd1d41e7c1 remove unneeded device:lockpixels
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1156073003
2015-05-25 21:21:27 -07:00
kkinnunen
61e91966aa Avoid creating GrGLPath to the resource cache when creating GrGLPathRanges
Do not create a GrGLPath when loading glyphs with the driver and creating
GrGLPathRange based on those. The path would be inserted to the GPU
resource cache and then immediately be released.

Instead, just init the first path object of the path range as the
template.

Review URL: https://codereview.chromium.org/1146983004
2015-05-24 22:12:22 -07:00
skia.buildbots
43c5bababc Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1159443003
2015-05-24 00:23:16 -07:00
reed
cf01e31df6 deprecate calling lockPixels
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1156003002
2015-05-23 19:14:51 -07:00
reed
95d343f408 move readPixels from bitmap -> pixmap
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1153893003
2015-05-23 13:21:07 -07:00
reed
c240e719b2 remove bitmaps entirely from sprite blits (as source)
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1156713004
2015-05-23 12:26:41 -07:00
bungeman
c33db93d1b Revert of Implement Porter Duff XP with a blend table (patchset #12 id:220001 of https://codereview.chromium.org/1124373002/)
Reason for revert:
Blocking DEPS roll into Chromium. Crashing virtual/gpu/fast/canvas/canvas-composite-*.html tests with the assert

../../third_party/skia/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp:281: failed assertion "k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty()"

Original issue's description:
> 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:
>
> Committed: https://skia.googlesource.com/skia/+/9a70920db22b6309c671f8e5d519bb95570e4414

TBR=egdaniel@google.com,bsalomon@google.com,cdalton@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1153993002
2015-05-22 17:55:26 -07:00
bungeman
c319c80d09 Revert of Fix LCD coverage regression in GrPorterDuffXPFactory (patchset #3 id:40001 of https://codereview.chromium.org/1149883004/)
Reason for revert:
Reverting this fix to revert https://codereview.chromium.org/1124373002

Original issue's description:
> Fix LCD coverage regression in GrPorterDuffXPFactory
>
> Fixes GrPorterDuffXPFactory to not use the blend table when getting
> info about the LCD coverage XP.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3e2d59ef36e1b9a63e524cf1b27d5f7bcfb5ff0b

TBR=bsalomon@google.com,egdaniel@google.com,cdalton@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1153803005
2015-05-22 17:54:44 -07:00
mtklein
aa999cb952 Everyone gets a namespace {}.
If we include Sk4px.h, SkPMFloat.h, or SkNx.h into files with different
SIMD flags, that could cause different definitions of the same method.

Normally that's moot, because all the code inlines, but in Debug it tends not
to.  So in Debug, the linker picks one definition for us.  That breaks _someone_.

Wrapping everything in a namespace {} keeps the definitions separate.

Tested locally, it fixes this bug.
BUG=skia:3861

This code is not yet enabled in Chrome, so shouldn't affect the roll.
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1154523004
2015-05-22 17:18:21 -07:00
bungeman
d23a395d51 Revert of Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names. (patchset #6 id:100001 of https://codereview.chromium.org/1132093004/)
Reason for revert:
This is asserting on GTX660 bots with '!dst'. This may just be catching an existing issue.

https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/622/steps/dm/logs/stdio

https://build.chromium.org/p/client.skia/builders/Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE/builds/209/steps/dm/logs/stdio

https://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/318/steps/dm/logs/stdio

Original issue's description:
> Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names.
>
> Committed: https://skia.googlesource.com/skia/+/bb106b5f6ee18f7453b63f3a95f421b60a957f39

TBR=egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1158453004
2015-05-22 15:22:48 -07:00
bsalomon
bb106b5f6e Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names.
Review URL: https://codereview.chromium.org/1132093004
2015-05-22 14:32:10 -07:00
cdalton
3e2d59ef36 Fix LCD coverage regression in GrPorterDuffXPFactory
Fixes GrPorterDuffXPFactory to not use the blend table when getting
info about the LCD coverage XP.

BUG=skia:

Review URL: https://codereview.chromium.org/1149883004
2015-05-22 14:04:37 -07:00
bsalomon
682c269a15 Store context options on caps.
Committed: https://skia.googlesource.com/skia/+/f28cff71db2cbb1ff18a8fbf1e80ca761d1f69bc

Review URL: https://codereview.chromium.org/1158433006
2015-05-22 14:01:46 -07:00
joshualitt
a5f1d5a95a fix for atlas is abandoned text corruption
BUG=skia:

Review URL: https://codereview.chromium.org/1156693004
2015-05-22 13:09:57 -07:00
mtklein
4e506c200b Simpler version of Plus w/ AA. ~25% faster too.
BUG=skia:3852

TBR=fmalita@chromium.org

Review URL: https://codereview.chromium.org/1150693003
2015-05-22 12:43:41 -07:00
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
reed
a624d12b2d use SkPixmap inside sprite blitters
BUG=skia:

Review URL: https://codereview.chromium.org/1144923005
2015-05-22 12:10:46 -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
joshualitt
2a97c55ae3 Trivial patch to set a max lookback on reordering
BUG=skia:

Review URL: https://codereview.chromium.org/1150253003
2015-05-22 11:19:44 -07:00
stephana
c9b8276bc9 BUG=skia:
NOTRY=true
TBR=borenet

Review URL: https://codereview.chromium.org/1153783003
2015-05-22 10:55:33 -07:00
mtklein
27c2b09374 Move Sk4px Xfermode code to a header so we can use it twice.
- Once in SkXfermode as usual to pick up compile-time SSE and NEON
  - Once in SkXfermode_arm_neon to pick up run-time NEON

This allows us to start cleaning up SkXfermode_arm_neon as we've done
for SkXfermode_SSE2.  I'm saving this catharsis for a day when I need it.

The Sk4px xfermodes are generally faster than the existing NEON procs,
so this should also have the side effect of a perf win there.

This means our new Plus-AA code works for runtime NEON too.
BUG=skia:3852

Review URL: https://codereview.chromium.org/1150313003
2015-05-22 10:54:39 -07:00
jcgregorio
92c9743d2d Add more detail on how DM checksums are done.
This will be linked to from Gold for image diffs that have
different digests but no pixel differences.

BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1151153005

Review URL: https://codereview.chromium.org/1151153005
2015-05-22 10:42:13 -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
reed
92fc2ae583 add SkPixmap and external locking to bitmaps
BUG=skia:

Review URL: https://codereview.chromium.org/1074983003
2015-05-22 08:06:22 -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
bsalomon
706f08fbcb Move GrPath(Range) creation to ResourceProvider.
Review URL: https://codereview.chromium.org/1155593002
2015-05-22 07:35:58 -07:00
caryclark
a76b7a3b04 remove SK_LEGACY_STROKE_CURVES
The change in Chrome has been landed so this guard is no longer needed.

R=reed@google.com,fmalita@chromium.org
BUG=102411

Review URL: https://codereview.chromium.org/1157623003
2015-05-22 06:26:52 -07:00
mtklein
051a51ec32 Re-proc SkBlitRow::Color32 for ARM.
This is a spiritual revert of http://crrev.com/1104183004.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/4e13a23d8f720e17660f26657b45b89fe4339004

Review URL: https://codereview.chromium.org/1145283003
2015-05-22 06:08:29 -07:00
jvanverth
99babf2848 Further work on sRGB support.
Fix some caps.
Add framebuffer enum.

BUG=skia:3856

Review URL: https://codereview.chromium.org/1152563003
2015-05-22 06:06:40 -07:00
mtklein
3b8d9f776e Revert of Re-proc SkBlitRow::Color32 for ARM. (patchset #3 id:40001 of https://codereview.chromium.org/1145283003/)
Reason for revert:
http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/70016/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> Re-proc SkBlitRow::Color32 for ARM.
>
> This is a spiritual revert of http://crrev.com/1104183004.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4e13a23d8f720e17660f26657b45b89fe4339004

TBR=reed@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1157633003
2015-05-22 05:51:37 -07:00
kkinnunen
806236e797 Mark SkPaths created by GrContext fallback draw logic as volatile
GrContext draw functions (drawRect, drawRRect,...) fall back to
GrContext::drawPath for complex cases. Mark the argument SkPath
as volatile, since it is.

Progressions for nvprmsaa:
          tabl_androidpolice.skp_1	11.6ms -> 10.3ms	0.89x
                desk_twitter.skp_1	9.21ms -> 8.08ms	0.88x
                tabl_sahadan.skp_1	8.97ms -> 7.65ms	0.85x
              desk_wikipedia.skp_1	5.63ms ->  4.5ms	0.8x
                desk_booking.skp_1	11.5ms -> 8.87ms	0.77x
                   desk_ebay.skp_1	   7ms -> 5.37ms	0.77x

Makes rrects and rects go to "simple path" path cache (cached by contents).

No change for msaa, gpu.

BUG=skia:

Review URL: https://codereview.chromium.org/1150993002
2015-05-21 22:45:56 -07:00
mtklein
4e13a23d8f Re-proc SkBlitRow::Color32 for ARM.
This is a spiritual revert of http://crrev.com/1104183004.

BUG=skia:

Review URL: https://codereview.chromium.org/1145283003
2015-05-21 17:14:51 -07:00
joshualitt
5559ca2a18 Remove uniform view matrix from GrGLPrimitiveProcessor base class
BUG=skia:

Review URL: https://codereview.chromium.org/1151693005
2015-05-21 15:50:36 -07:00
mtklein
160d08cb01 Fix Plus
This makes Plus with AA ~3% slower.  Seems like a good deal.

GMs affected: mixed_xfermodes, the new one.

Based on https://codereview.chromium.org/1150833003/

Still TODO: NEON.  The new GM should show this.

BUG=skia:3852

Review URL: https://codereview.chromium.org/1156453002
2015-05-21 15:47:40 -07:00
reed
5a72c42952 remove unused SkBitmap::scrollRect API
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1154623002
2015-05-21 15:46:20 -07:00
ochang
3ece53ed30 Add mode validation to PtProcRec::init.
BUG=486946

Review URL: https://codereview.chromium.org/1142563003
2015-05-21 15:44:53 -07:00
mtklein
5a7cd87bd2 Clean up Sk4f xfermodes and covered _SSE2 xfermodes.
Before I get going on fixing Plus, it's nice to clear out the dead cruft.

BUG=skia:3852

Review URL: https://codereview.chromium.org/1150833003
2015-05-21 14:08:14 -07:00
stephana
18b72db6aa Temporarily disable nanobench to see what else is in the way of the bots going green.
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1147333002
2015-05-21 13:59:36 -07:00
Eric Boren
e59e1b22a3 Whitespace change to trigger builds
Two major things have happened:
1. Android bots split between more machines. This caused lots of
   congestion-related failures, leading to...
2. All buildslaves now use a single checkout for all of the builders
   that they run. This should give us far fewer problems when we have
   to re-download SKPs, toolchains, etc.

TBR=rmistry
BUG=skia:3835,3774

Review URL: https://codereview.chromium.org/1154603002
2015-05-21 16:19:22 -04:00
mtklein
7005a57c54 Add PlusMergesAA GM
C.f. https://crrev.com/1156453002/

BUG=skia:

Review URL: https://codereview.chromium.org/1149103003
2015-05-21 10:33: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
halcanary
e797d0de67 SkBlockMemoryStream implements peek()
Review URL: https://codereview.chromium.org/1146903004
2015-05-21 08:13:27 -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
reed
ab8657722c add assert that the lock-count on pixelref is balanced
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1147153004
2015-05-21 06:29:05 -07:00