Commit Graph

18572 Commits

Author SHA1 Message Date
wangyix
69ed114d38 Added class AutoFragmentChildProcAdvance to be constructed before a child emitCode and destructed after
Fixed wrong indent

Changed auto child advance back to backwards linear search for getting subset of coords and samplers array of a child

Used offset from parent instead of backwards linear search to find a child proc's coords and transforms in Auto...Advance

append mangleString to variable name in nameVariable()

BUILDS! Added AutoFragmentChildProcAdvance class; fixed a few errors from previous commits

BUG=skia:4182

Review URL: https://codereview.chromium.org/1286293002
2015-08-18 07:24:29 -07:00
caryclark
94c902e63d fix pathops fuzz failures
If a curve has the identical start and control points, the
initial or final tangent can't be trivally determined. The
perpendicular to the tangent is used to measure coincidence.

Add logic for cubics, quadratics, and conics, to use the
secondary control points or the end points if the initial
control point alone can't determine the tangent.

Add debugging (currently untriggered by exhaustive testing)
to detect zero-length tangents which are not at the curve
endpoints.

Increase the number of temporary intersecions gathered from
10 to 12 but reduce the max passed in by cubic intersection from
27 to 12. Also, add checks if the max passed exceeds the
storage allocated.

When cleaning up parallel lines, choose the intersection which
is on the end of both segments over the intersection which
is on the end of a single segment.

TBR=reed@google.com
BUG=425140,516266

Review URL: https://codereview.chromium.org/1288863004
2015-08-18 07:12:44 -07:00
benjaminwagner
f82c13fced Reland of Fix a few bugs in the google3 sync scripts. (patchset #1 id:1 of https://codereview.chromium.org/1295213002/ )
Reason for revert:
Retry.

Original issue's description:
> Revert of Fix a few bugs in the google3 sync scripts. (patchset #1 id:1 of https://codereview.chromium.org/1291343006/ )
>
> Reason for revert:
> MacMini buildbots were unable to apply the patch.
> fatal: Could not parse object '18af0a0080cc2b2b3464292d35a0886cdade551f'.
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release/builds/1580
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Debug/builds/1474
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release/builds/1566
> http://build.chromium.org/p/client.skia/builders/Perf-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release/builds/1480
> http://build.chromium.org/p/client.skia/builders/Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release/builds/1456
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1364
>
>
> Original issue's description:
> > Fix a few bugs in the google3 sync scripts.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/18af0a0080cc2b2b3464292d35a0886cdade551f
>
> TBR=mtklein@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e349d6b92574c1b0acdb4ba1ed8ff905ea830131

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1284093003
2015-08-18 06:25:14 -07:00
bsalomon
e46f9feb44 Privatize GrBatch subclass overrides
Review URL: https://codereview.chromium.org/1301663002
2015-08-18 06:05:14 -07:00
mtklein
cf9c475903 Remove a couple zombie pathops files.
These files don't compile and are not referenced by any GYP file.

BUG=skia:

Review URL: https://codereview.chromium.org/1299773002
2015-08-18 05:51:56 -07:00
mtklein
9483763793 Remove SkOpts_sse2.cpp.
It's sort of pointless: all our clients that will have SSE2 at runtime have it
unconditionally at compile time, so the functions in namespace portable will
pick up the SSE2 code.  The procs in SkOpts_sse2.o were just duplicate code.

A couple of the procs we had in _sse2.cpp can benefit slightly when compiled
with SSSE3.  I've moved those to _ssse3.cpp.  This should lead to small speedups
on platforms like Linux and Windows that have a baseline of SSE2.

Similarly, I've removed the call to Init_neon() when NEON is available globally... it's a no-op.

Renaming namespace portable to something clearer is TBD.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1294213002
2015-08-18 05:18:53 -07:00
reed
95dd17737d Revert[8] "move some public headers into private"
This reverts commit fb28cd2b13.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1298833002
2015-08-17 18:29:48 -07:00
robertphillips
ea4529d09a Move normal map creation methods to sk_tools
Split off of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Review URL: https://codereview.chromium.org/1298763002
2015-08-17 15:04:47 -07:00
mtklein
df5b7603d2 Add a simple script to simulate BUILD file glob() expansion.
This lets us test changes to BUILD.public.

This is not yet automated in any way.  My hope is to trigger it quietly via the presubmit for any CL that adds or removes a file, or changes BUILD.public.

BUG=skia:

Review URL: https://codereview.chromium.org/1290833003
2015-08-17 15:02:57 -07:00
benjaminwagner
e349d6b925 Revert of Fix a few bugs in the google3 sync scripts. (patchset #1 id:1 of https://codereview.chromium.org/1291343006/ )
Reason for revert:
MacMini buildbots were unable to apply the patch.
fatal: Could not parse object '18af0a0080cc2b2b3464292d35a0886cdade551f'.
http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release/builds/1580
http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Debug/builds/1474
http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release/builds/1566
http://build.chromium.org/p/client.skia/builders/Perf-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release/builds/1480
http://build.chromium.org/p/client.skia/builders/Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release/builds/1456
http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1364

Original issue's description:
> Fix a few bugs in the google3 sync scripts.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/18af0a0080cc2b2b3464292d35a0886cdade551f

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1295213002
2015-08-17 14:44:01 -07:00
benjaminwagner
18af0a0080 Fix a few bugs in the google3 sync scripts.
BUG=skia:

Review URL: https://codereview.chromium.org/1291343006
2015-08-17 14:23:03 -07:00
benjaminwagner
787ca87b33 Add files added to Skia HEAD in google3 to the Git repo.
LICENSE is modified in google3 to mention some code copied from other projects.

BUG=skia:

Review URL: https://codereview.chromium.org/1291603003
2015-08-17 12:58:10 -07:00
bsalomon
7539856c1b Make GrVertexBatch objects hold their own draws during GrDrawTarget flush
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1286043004
2015-08-17 12:55:38 -07:00
joshualitt
1a899c9d54 Stop ping ponging AA in SkGpuDevice
BUG=skia:

Review URL: https://codereview.chromium.org/1299703003
2015-08-17 11:53:44 -07:00
mtklein
dcbaa8ab6d Revert of Depend on ETC1 via DEPS instead of a direct third_party checkin. (patchset #1 id:1 of https://codereview.chromium.org/1296253003/ )
Reason for revert:
This will make the google3 roll awkward.  Reverting.

Original issue's description:
> Depend on ETC1 via DEPS instead of a direct third_party checkin.
>
> Yes, this does mean we'll check out ~40M of code for 2 files...
>
> I think these trybots are moot... they gclient sync before patching.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/ca01d179347b5e848ded97c8228b79ffc6b5e7bf

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

Review URL: https://codereview.chromium.org/1290913008
2015-08-17 11:15:00 -07:00
joshualitt
a61c817272 drawBitmapImage can batch across AA rects
BUG=464835

Committed: https://skia.googlesource.com/skia/+/0d4bcea0d570041434ac3de2df2bd9063138fdb5

Review URL: https://codereview.chromium.org/1293543002
2015-08-17 10:51:22 -07:00
Derek Sollenberger
b279668c64 fix typo in android_framework_lib.gyp
BUG=skia:

Review URL: https://codereview.chromium.org/1293183002 .
2015-08-17 13:39:03 -04:00
djsollen
a408260bfa Add GPU to the android include path.
Review URL: https://codereview.chromium.org/1301623002
2015-08-17 10:20:46 -07:00
mtklein
ca01d17934 Depend on ETC1 via DEPS instead of a direct third_party checkin.
Yes, this does mean we'll check out ~40M of code for 2 files...

I think these trybots are moot... they gclient sync before patching.

BUG=skia:

Review URL: https://codereview.chromium.org/1296253003
2015-08-17 10:20:16 -07:00
caryclark
6a91ad22a4 remove unused code
R=mtklein@google.com

Review URL: https://codereview.chromium.org/1297013002
2015-08-17 10:01:24 -07:00
fmalita
f433bb2beb SkPaintFilterCanvas should inherit the target canvas state
Currently, SkPaintFilterCanvas does not provide any help in cloning
target canvas state.  While that could be handled in subclasses, it is
easy to miss (see linked bug).

This CL adds a new constructor variant which ensures that the initial
matrix and clip bounds are inherited from the target canvas.

BUG=516790
R=reed@google.com,robertphillips@google.com

Review URL: https://codereview.chromium.org/1294013002
2015-08-17 08:05:13 -07:00
msarett
340f3074b4 Fix webp compile warnings on windows
This fix was landed with:
https://codereview.chromium.org/1280073002/

The above CL was reverted due to an unrelated bug in libwebp.

The above CL contains multiple components, and I think that
reverting this part of the change was unintentional.

BUG=skia:

Review URL: https://codereview.chromium.org/1286903003
2015-08-17 07:49:38 -07:00
joshualitt
29553b39bb Revert of drawBitmapImage can batch across AA rects (patchset #5 id:80001 of https://codereview.chromium.org/1293543002/ )
Reason for revert:
a follow up patch exposes a bug

Original issue's description:
> drawBitmapImage can batch across AA rects
>
> BUG=464835
>
> Committed: https://skia.googlesource.com/skia/+/0d4bcea0d570041434ac3de2df2bd9063138fdb5

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

Review URL: https://codereview.chromium.org/1291663005
2015-08-17 07:20:58 -07:00
joshualitt
0d4bcea0d5 drawBitmapImage can batch across AA rects
BUG=464835

Review URL: https://codereview.chromium.org/1293543002
2015-08-17 06:59:36 -07:00
rmistry
4a75dd3a2c Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1296513004
2015-08-16 00:20:54 -07:00
reed
8a41adb1d1 support both box and circle lcd
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1292943003
2015-08-15 14:02:29 -07:00
reed
5f629b42e5 show LCD on max fat-zoom
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1295483003
2015-08-15 11:57:23 -07:00
rmistry
0b3a28b7d2 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1291273003
2015-08-15 11:00:58 -07:00
reed
fb28cd2b13 Revert[7] "move some public headers into private"
This reverts commit e02716908f.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1300523002
2015-08-15 08:46:27 -07:00
reed
bb886749fe increase zoom in fatbits
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1300513002
2015-08-15 07:42:31 -07:00
reed
e02716908f Revert[6] "move some public headers into private"
This reverts commit cc1229c9d5.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1295003002
2015-08-15 07:28:34 -07:00
joshualitt
a83eeaddd3 Revert of stop dropping AA when rect stays rect (patchset #8 id:140001 of https://codereview.chromium.org/1295523002/ )
Reason for revert:
breaks layout tests

Original issue's description:
> stop dropping AA when rect stays rect
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1bef9f59c566cc54c2259cc4d0171c115157cd1c

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

Review URL: https://codereview.chromium.org/1295813005
2015-08-14 11:36:03 -07:00
halcanary
f5fb939867 SkPDF: Move SkFlate into src/pdf (part 3/3)
This must land after http://crrev.com/1288053002

Motivation: Skia only uses SkFlate in the SkPDF module.

Review URL: https://codereview.chromium.org/1288063002
2015-08-14 11:26:33 -07:00
mtklein
9a106ba2dd A bit of misc cleanup.
- Update comments about skia_shared_lib
 - Remove dead code (system_preferences)
 - Remove non-building code (techtalk1)
 - Turn gm/annotated_text back on.

BUG=skia:

Review URL: https://codereview.chromium.org/1286133004
2015-08-14 10:03:45 -07:00
joshualitt
090ae8e454 fix valgrind issue
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1289203004
2015-08-14 09:01:21 -07:00
joshualitt
40ac15a62e fix viewmatrix mapping in AAFillRect
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1293823003
2015-08-14 08:45:39 -07:00
egdaniel
540e4888a5 Add include paths in gputest.gyp for use by additional gpu tests.
BUG=skia:

Review URL: https://codereview.chromium.org/1290553005
2015-08-14 08:37:50 -07:00
mtklein
820bffb893 Build all GMs on Android.
Many of these were excluded from the build for bots that no longer exist.

Will fix up anything that starts failing using dm_flags.py.

BUG=skia:2326,skia:2313, skia:1978

Review URL: https://codereview.chromium.org/1290943004
2015-08-14 08:33:50 -07:00
scroggo
cc2feb161f Support more swizzles to 565 in SkCodec
Add more swizzling functions for swizzling to 565. Much of this
code was revived from crrev.com/1055743003 (for BMP). Also added
swizzling functions for WBMP.

Consolidate the static function conversion_possible.

In SkCodec::getPixels, check that the alphatype corresponds to the
colorType. This prevents requesting 565 + non-opaque.

In SkIcoCodec, report that the image is unpremul (instead of
whatever the largest embedded codec thinks), but modify the
requested info to have the alpha type expected/required by the
embedded codec.

Add tests for decoding to 565.

BUG=skia:3257
BUG=skia:3683

Review URL: https://codereview.chromium.org/1277213002
2015-08-14 08:32:46 -07:00
emmaleer
8f4ba76742 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

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

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

Review URL: https://codereview.chromium.org/1260673002
2015-08-14 07:44:46 -07:00
joshualitt
1bef9f59c5 stop dropping AA when rect stays rect
BUG=skia:

Review URL: https://codereview.chromium.org/1295523002
2015-08-14 07:10:57 -07:00
egdaniel
b0a32cc38f Revert of SkScaledCodec class (patchset #35 id:680001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
breaking ubuntu bots

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47
>
> Committed: https://skia.googlesource.com/skia/+/b157917507d4f7d2651f0aeb566d31603cc02240

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com,emmaleer@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1285173003
2015-08-14 06:37:37 -07:00
joshualitt
2ba70995f8 Add GM to test drawing atlas case
BUG=skia:

Review URL: https://codereview.chromium.org/1294513002
2015-08-14 06:30:50 -07:00
mtklein
6fbdeef91c Revert of Paranoid temporary check that Chrome's building with SSE2 on all Windows builders. (patchset #1 id:1 of https://codereview.chromium.org/1283183004/ )
Reason for revert:
Nothing broke.  Experiment is over... SSE2 is present.

Original issue's description:
> Paranoid temporary check that Chrome's building with SSE2 on all Windows builders.
>
> BUG=chromium:475596
>
> Committed: https://skia.googlesource.com/skia/+/e8445307ac33eddcf04457ae21040e47dc9c2a97

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

Review URL: https://codereview.chromium.org/1296593002
2015-08-14 05:49:18 -07:00
emmaleer
b157917507 SkScaledCodec class
This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

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

Review URL: https://codereview.chromium.org/1260673002
2015-08-14 05:46:09 -07:00
mtklein
e8445307ac Paranoid temporary check that Chrome's building with SSE2 on all Windows builders.
BUG=chromium:475596

Review URL: https://codereview.chromium.org/1283183004
2015-08-13 17:53:28 -07:00
bsalomon
16b991390b Split GrDrawBatch and GrVertexBatch into their own files
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1296483002
2015-08-13 14:55:50 -07:00
reed
8f4fe37b1c some catchup CL revisions
BUG=skia:

Review URL: https://codereview.chromium.org/1295593002
2015-08-13 14:06:46 -07:00
mtklein
7e6d9c0326 Every pixel ref gets its own mutex.
Seems like a memory-saving flourish follow up would be to use SkSpinlock.

BUG=Florin's email.

Review URL: https://codereview.chromium.org/1289623004
2015-08-13 14:02:06 -07:00
emmaleer
c7993d747f Revert of SkScaledCodec class (patchset #34 id:660001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
Seg-faulting:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1608/steps/dm/logs/stdio

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1294613002
2015-08-13 13:59:21 -07:00