Commit Graph

17521 Commits

Author SHA1 Message Date
reed
19663e54c0 Revert of add asserts around results from requestLock (patchset #3 id:40001 of https://codereview.chromium.or… (patchset #1 id:1 of https://codereview.chromium.org/1165583005/)
Reason for revert:
failure in cc_unittests (need to diagnose)

@@@STEP_LOG_LINE@ResourceProviderTests_ResourceProviderTest.TransferInvalidSoftware_1@ResourceProviderTests/ResourceProviderTest.TransferInvalidSoftware/1 (run #1):@@@
@@@STEP_LOG_LINE@ResourceProviderTests_ResourceProviderTest.TransferInvalidSoftware_1@[ RUN      ] ResourceProviderTests/ResourceProviderTest.TransferInvalidSoftware/1@@@
@@@STEP_LOG_LINE@ResourceProviderTests_ResourceProviderTest.TransferInvalidSoftware_1@[17114:17114:0529/180822:15336467671:INFO:SkPixelRef.cpp(168)] ../../third_party/skia/src/core/SkPixelRef.cpp:168: failed assertion "pixels"@@@

Original issue's description:
> add asserts around results from requestLock (patchset #3 id:40001 of https://codereview.chromium.org/1155403003/)"
>
> This reverts commit 3953d36041.
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/6980f5a96455c8062403c995a64b654a0e9a1319

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1151573009
2015-05-29 18:36:07 -07:00
reed
6980f5a964 add asserts around results from requestLock (patchset #3 id:40001 of https://codereview.chromium.org/1155403003/)"
This reverts commit 3953d36041.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1165583005
2015-05-29 15:46:36 -07:00
reed
3953d36041 Revert of add asserts around results from requestLock (patchset #3 id:40001 of https://codereview.chromium.org/1155403003/)
Reason for revert:
asserts in ui/gfx unittests (need to investigate why)

[ RUN      ] RenderTextTest.SelectionKeepsLigatures
[14602:14602:0529/134016:16779526944:INFO:SkPixelRef.cpp(164)] ../../third_party/skia/src/core/SkPixelRef.cpp:164: failed assertion "pixels"

Original issue's description:
> add asserts around results from requestLock and lockPixels, ensuring that true always means we have non-null pixels (and non-null colortable if that matches the colortype)
>
> BUG= 491975
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/f941a68126d8fe647eaea902c244c466568b7809

TBR=scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 491975

Review URL: https://codereview.chromium.org/1159013006
2015-05-29 14:22:05 -07:00
reed
f941a68126 add asserts around results from requestLock and lockPixels, ensuring that true always means we have non-null pixels (and non-null colortable if that matches the colortype)
BUG= 491975
TBR=

Review URL: https://codereview.chromium.org/1155403003
2015-05-29 11:39:14 -07:00
bsalomon
993a4216a6 SkImage::NewFromYUVTexturesCopy
Review URL: https://codereview.chromium.org/1149553002
2015-05-29 11:37:25 -07:00
bsalomon
4061b1262e Remove GrContext from GrDrawTarget
Still exists on clip target (for now).

Review URL: https://codereview.chromium.org/1166553002
2015-05-29 10:26:19 -07:00
bsalomon
edd77a112d Remove GrContext from GrClipMaskCache
Review URL: https://codereview.chromium.org/1144013007
2015-05-29 09:45:57 -07:00
bungeman
c4fba51ea6 Add Em test font.
This test font contains
☓ U+2613 SALTIRE
 U+2B1B BLACK LARGE SQUARE
 U+2B1C WHITE LARGE SQUARE
All at full EM size (with standard amount above and below the
baseline).

Review URL: https://codereview.chromium.org/1134153002
2015-05-29 08:42:21 -07:00
caryclark
ecaf9c9c21 use inline version of eval quad if tangent is not needed
R=reed@google.com

Review URL: https://codereview.chromium.org/1160163002
2015-05-29 08:11:16 -07:00
joshualitt
29f8679068 Removing GrAutoMalloc
BUG=skia:

Review URL: https://codereview.chromium.org/1161993003
2015-05-29 08:06:48 -07:00
bsalomon
7622863095 Add direct getter for GrCaps to GrContext.
TBR=joshualitt@google.com

Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99

Review URL: https://codereview.chromium.org/1149773005
2015-05-29 08:02:10 -07:00
reed
ff2f423d90 add bench for building strokes
BUG=skia:

Review URL: https://codereview.chromium.org/1160093004
2015-05-29 07:17:16 -07:00
joshualitt
611cc5f964 delete experimental path renderers
BUG=skia:

Review URL: https://codereview.chromium.org/1160863006
2015-05-29 07:09:09 -07:00
joshualitt
7224c86632 add context override of GeometryBufferMapThreshold
BUG=skia:

Review URL: https://codereview.chromium.org/1159713006
2015-05-29 06:46:47 -07:00
reed
e800657f2f add assert that the pixelref really did success in requestlock
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1142343010
2015-05-28 14:06:06 -07:00
joshualitt
bd245426bb Revert of small CL to experiment with 'disabling' memory mapping (patchset #1 id:1 of https://codereview.chromium.org/1160003004/)
Reason for revert:
experiment complete

Original issue's description:
> small CL to experiment with 'disabling' memory mapping
>
> TBR=bsalomon@google.com
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2e48e1514396b363ecd19372eab637b11bfb8a82

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

Review URL: https://codereview.chromium.org/1159133004
2015-05-28 13:40:20 -07:00
rmistry
9f19e8034b Whitespace change to test bugdroid
BUG=493278
BUG=skia:2139

NOTRY=true
TBR=

Review URL: https://codereview.chromium.org/1166443002
2015-05-28 11:59:07 -07:00
joshualitt
2e48e15143 small CL to experiment with 'disabling' memory mapping
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1160003004
2015-05-28 11:53:49 -07:00
bsalomon
084d1b61bc Revert of Add direct getter for GrCaps to GrContext. (patchset #4 id:60001 of https://codereview.chromium.org/1149773005/)
Reason for revert:
Breaking

Original issue's description:
> Add direct getter for GrCaps to GrContext.
>
> TBR=joshualitt@google.com
>
> Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99

TBR=joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1164443002
2015-05-28 08:20:58 -07:00
bsalomon
9138c46e57 Add direct getter for GrCaps to GrContext.
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1149773005
2015-05-28 08:13:16 -07:00
robertphillips
9c240a1e6d Break GrTextContext's reliance on SkGpuDevice
This CL seems to have 2 main downsides:

1) It duplicates some code in SkBaseDevice::filterTextFlags
2) It makes it tougher to derive from SkGpuDevice

It seems reasonable (at least to me) that the TextContexts get the power to reset the LCD flags.

Review URL: https://codereview.chromium.org/1159973002
2015-05-28 07:45:59 -07:00
reed
6e43465039 simplify RawIter - don't return a pt in kClose
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1156893003
2015-05-27 19:53:25 -07:00
cdalton
6fd158ea47 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. Separates out the dst
read fallback into its own XP.

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

Review URL: https://codereview.chromium.org/1124373002
2015-05-27 15:08:33 -07:00
halcanary
3098a752ef Better comments in SkXfermodeInterpretation
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1159493003
2015-05-27 14:43:40 -07:00
joshualitt
f152e98cfa revert reordering
BUG=skia:

Review URL: https://codereview.chromium.org/1155593004
2015-05-27 14:28:09 -07:00
bsalomon
4ee6bd86c5 Add caps overrides to GMs
Review URL: https://codereview.chromium.org/1158963002
2015-05-27 13:23:23 -07:00
bungeman
a9f1db7902 Use SkTArray instead of SkSTArray in movable.
SkTArray is trivially movable, but SkSTArray is not, since it may
contain an internal pointer. FontFileInfo is supposed to be
trivially movable but currently isn't due to containing an SkSTArray.
Removing this particular optimization should not affect performance
much as this type is only used for parsing and does not allocate any
memory unless a variation axis is actually specified.

Review URL: https://codereview.chromium.org/1155383002
2015-05-27 13:10:03 -07:00
emmaleer
9700206b67 New CodeSrc* draw mode kScanline_Subset_Mode
kScanline_Subset_Mode decodes the image in subsets using a
scanline decoder.
The number of subsets can be specified by changing the constant divisor.
The number of subsets is equal to divisor*divisor.

Review URL: https://codereview.chromium.org/1157153003
2015-05-27 12:36:10 -07:00
robertphillips
ccb1b57510 Move SkGpuDevice::internalDrawPath to GrBlurUtils::drawPathWithMaskFilter
This CL is ugly but it:

removes the stored SkGpuDevice back pointer from GrTextContext (at the cost of passing more parameters)
moves SkGpuDevice::internalDrawPath to GrDrawContext::drawPathFull

Unfortunately, the GrTextContext-derived classes still need the SkGpuDevice for filterTextFlags calls but I will try removing that in a separate CL.

Review URL: https://codereview.chromium.org/1157773003
2015-05-27 11:02:55 -07:00
joshualitt
24a366a037 Fall back to older inorder buffer if we have NVPR
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/b72ec98b2090e5728354dac66eb1886a28e4da6b

Review URL: https://codereview.chromium.org/1143153008
2015-05-27 10:56:41 -07:00
joshualitt
d8e2d28913 Revert of Fall back to older inorder buffer if we have NVPR (patchset #3 id:40001 of https://codereview.chromium.org/1143153008/)
Reason for revert:
breaking bots

Original issue's description:
> Fall back to older inorder buffer if we have NVPR
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b72ec98b2090e5728354dac66eb1886a28e4da6b

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

Review URL: https://codereview.chromium.org/1160663006
2015-05-27 10:39:56 -07:00
joshualitt
b72ec98b20 Fall back to older inorder buffer if we have NVPR
BUG=skia:

Review URL: https://codereview.chromium.org/1143153008
2015-05-27 10:31:12 -07:00
joshualitt
e932a6466b enable reordering
NO_MERGE_BUILDS
BUG=skia:

Review URL: https://codereview.chromium.org/1158213002
2015-05-27 09:20:08 -07:00
joshualitt
da7b843fbd CL to add setFullscreen and setVsync to SkWindow
BUG=skia:

Review URL: https://codereview.chromium.org/1151333004
2015-05-27 09:19:03 -07:00
halcanary
a681433d42 SkPDF: with opaque draws, treat SRC mode as SRC_OVER
BUG=473572

Review URL: https://codereview.chromium.org/1159763004
2015-05-27 08:53:36 -07:00
emmaleer
7dc9190b76 fixing onSkipScanlines png error
There was a bug in onSkipScanlines where NULL was being passed instead of the SrcRow to png_read_rows.
This caused SkipScanlines to appear to be skipping, as fCurrScanline was updated and SkipScanlines returned success, however png_read_rows was not actually reading anything, and no lines were skipped.

Review URL: https://codereview.chromium.org/1159853003
2015-05-27 08:49:04 -07:00
reed
9572a10c9a don't use accessBitmap
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1154293002
2015-05-26 19:22:17 -07:00
robertphillips
4b195e5d8f Unblock DEPS roll by remove SkAutoTUnref from GrDrawContext
BUG=skia:

Review URL: https://codereview.chromium.org/1156103006
2015-05-26 14:37:00 -07:00
tomhudson
b97e909151 Fix SkAndroidSDKCanvas virtuals
Catch Android Framework-only code up to a change made in the
SkCanvas signature.

R=scroggo@google.com,reed@google.com

Review URL: https://codereview.chromium.org/1151673004
2015-05-26 14:12:25 -07:00
reed
5bcef1b3e8 speculative revert change to pixmap for bitmapscaler
BUG=491891
TBR=

Review URL: https://codereview.chromium.org/1159793003
2015-05-26 13:57:04 -07:00
joshualitt
7a9c45c01c real fix for textblob use after gpu free
This patch addresses two issues:
1) Textblobs with abandoned strikes were not properly regenerating.
2) Provided by ericrk - GrTextBlobCache removed blobs from |fCache| during freeAll, but left
potentially released blobs in the |fBlobList|. We now remove these from
|fBlobList| as well.
BUG=skia:

Review URL: https://codereview.chromium.org/1160633002
2015-05-26 12:32:23 -07:00
bsalomon
dc47ff7f1f Split GrCaps impl out into its own cpp
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1151503003
2015-05-26 12:16:59 -07:00
robertphillips
ea46150344 Split drawing functionality out of GrContext and into new GrDrawContext
This is mainly a mechanical CL. There were some fiddly bits in GrContext.cpp where it no longer had access to the GrDrawTarget (and had to use the new GrDrawContext).

I've converted GrAARectRenderer & GrOvalRenderer into static classes so I could stop allocating them.

Review URL: https://codereview.chromium.org/1151283004
2015-05-26 11:38:03 -07:00
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