Commit Graph

14882 Commits

Author SHA1 Message Date
bsalomon
71cb0c241e Replace GrResourceCache with GrResourceCache2.
BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89

Review URL: https://codereview.chromium.org/716143004
2014-11-14 12:10:15 -08:00
reed
ae760d579c update gm to place inner rect on fractional boundary
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/730673002
2014-11-14 11:59:10 -08:00
bsalomon
191bcc008e Fix ref-cnting bug in GrContext::readRenderTargetPixels
TBR=egdaniel@google.com
NOTRY=true

Review URL: https://codereview.chromium.org/732713002
2014-11-14 11:31:13 -08:00
djsollen
c87dd2ce96 Enable unused param checking for public includes.
This CL cleans up the existing violations and enables the
build time check to ensure that we don't regress.

The motiviation behind this change is to allow clients who include
our headers to be able to build with this warning enabled.

Review URL: https://codereview.chromium.org/726923002
2014-11-14 11:11:46 -08:00
djsollen
33068c19f1 Enforce pure virtual behavior for onMatchFamilyStyleCharacter
All impls that previously did not define the functions have been
updated to return NULL.

NOTRY=true

Review URL: https://codereview.chromium.org/728873002
2014-11-14 10:52:53 -08:00
mtklein
d4897591fd Don't pass null to memcmp.
This will allow us to add nonnull-attribute to the UBSAN bot.

We are in fact hitting a case where one of the arguments is null and the other
not, which seems dicey.  I think the scenario is comparing the empty pathref
with another path ref that's just been COWed, without any verbs or points yet.

BUG=skia:

Review URL: https://codereview.chromium.org/732643002
2014-11-14 09:22:40 -08:00
reed
36e6e266b8 add gm for 2-rects and blur
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/728863002
2014-11-14 08:27:40 -08:00
qiankun.miao
f04713d9c8 Optimize SkAlphaMulQ_SSE2
These two mask clear are useless, because _mm_srli_epi16 fills high byte
of each word with 0.

BUG=skia:

Review URL: https://codereview.chromium.org/724333003
2014-11-14 08:23:53 -08:00
mtklein
c7e55e410c Steal ASAN skimage expectations for UBSAN.
NOTRY=true

BUG=skia:3096

Review URL: https://codereview.chromium.org/731553002
2014-11-14 07:50:51 -08:00
djsollen
082a4620fd Move WGL header from include to src
NOTRY=true

Review URL: https://codereview.chromium.org/728823002
2014-11-14 07:21:29 -08:00
bsalomon
ac49acda52 Revert of Replace GrResourceCache with GrResourceCache2. (patchset #7 id:120001 of https://codereview.chromium.org/716143004/)
Reason for revert:
broken again

Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
>
> Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/726913002
2014-11-14 06:47:39 -08:00
bsalomon
407aa584d1 Replace GrResourceCache with GrResourceCache2.
BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

Review URL: https://codereview.chromium.org/716143004
2014-11-14 06:29:40 -08:00
djsollen
5ae776504f Cleanup the XML directory in public includes.
Review URL: https://codereview.chromium.org/722343002
2014-11-14 05:52:50 -08:00
skia.buildbots
bc9431edc2 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/732443002
2014-11-13 23:05:53 -08:00
tfarina
8816e7bfbe Cleanup: Delete SkFlattenableBuffers header.
It is empty. cs.chromium.org shows no one is including it.

BUG=skia:3108
R=reed@google.com

Review URL: https://codereview.chromium.org/722943002
2014-11-13 14:49:59 -08:00
reed
d54d3fc824 remove unused kLCD_MaskFormat
BUG=skia:

Review URL: https://codereview.chromium.org/728673002
2014-11-13 14:39:58 -08:00
fmalita
112e7e2777 Observe surface LCD settings in SkBaseDevice::drawTextBlob()
We're currently overwriting the paint LCD text flag based on the the run
font data => this cancels any LCD filtering we might have performed
higher up the stack.

BUG=423362
R=reed@google.com

Review URL: https://codereview.chromium.org/718913003
2014-11-13 14:05:58 -08:00
mtklein
975ae5e4b8 Cap SkVarAlloc's desired block at 64K.
This means we can store fLgMinSize in 4 bits (TBD).

Local perf comparison calls this harmless-to-slightly-helpful.  Nothing to get
excited about, but seems to certainly not harm perf.

BUG=skia:

Review URL: https://codereview.chromium.org/722293003
2014-11-13 13:55:22 -08:00
bsalomon
6740feb093 Don't use /ZI on 64 bit windows
Review URL: https://codereview.chromium.org/728633002
2014-11-13 13:47:06 -08:00
bsalomon
f21dab9540 Revert of Replace GrResourceCache with GrResourceCache2. (patchset #6 id:100001 of https://codereview.chromium.org/716143004/)
Reason for revert:
Breaking stuff

Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/715333003
2014-11-13 13:33:28 -08:00
bsalomon
66a450f21a Replace GrResourceCache with GrResourceCache2.
BUG=skia:2889

Review URL: https://codereview.chromium.org/716143004
2014-11-13 13:19:10 -08:00
bungeman
bc97c9378b Remove SK_IGNORE_SUBPIXEL_AXIS_ALIGN_FIX.
This define was added with "Always round text position correctly."
9447103029 . The affected clients
have been rebaselined and this is no longer defined anywhere.

Review URL: https://codereview.chromium.org/722333002
2014-11-13 13:06:28 -08:00
mtklein
a918cd9fb7 Unsuppress freetype, which may be our gammatext problem.
BUG=skia:

Review URL: https://codereview.chromium.org/721333003
2014-11-13 12:54:35 -08:00
djsollen
0b17d6cb34 Cleanup public includes directory.
This CL updates various files in the includes directory to ensure that (1) they do
not depend on headers in /src and (2) that they minimize their dependence on external
headers.

To ensure that we don't regress this behavior a new build target has been added to
build a single cpp file that contains all* public includes and is compiled with
only those directories in the include path.

* The exception is those includes that depend on OS specific headers

BUG=skia:2941
NOTRY=true

Review URL: https://codereview.chromium.org/721903002
2014-11-13 12:52:35 -08:00
reed
04f7e14b38 clean up dead code
BUG=skia:

Review URL: https://codereview.chromium.org/722113003
2014-11-13 12:46:24 -08:00
mtklein
f2950b1c45 Deparameterize SkVarAlloc.
SkRecord performance is not sensitive to these values, so we can cut some
storage.  This rearranges the space-remaining logic to use a count of bytes
left rather than a pointer to the end, cutting memory usage a little more.

An SkVarAlloc used to weigh 20 or 32 bytes which now becomes 16 or 24.

I think if I think about it a bit more I can trim off that Block* too,
getting us to 12 or 16 bytes.

Because we now just always grow by doubling, this CL switches from storing
fSmallest to its log base 2.  This has the nice effect of never having to worry
about it overflowing, and means we can probably squeeze it down into a byte
if we want, even 6 bits.

BUG=skia:

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

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot

Review URL: https://codereview.chromium.org/721313002
2014-11-13 12:41:14 -08:00
reed
b2db898573 rename filterTextFlags to disableLCD
Under the hood, add SkPixelGeometry to the CreateInfo for new devices, allowing them to see their geometry (SkDeviceProperties) up front, rather than having it changed later.

The only exception is for devices that are used on the root-layer, where we don't see the device until after the fact (at least as long as we allow clients to attach a device to a canvas externally).

We also filter the geometry when we're creating a layer, so we can disable LCD text automatically if the layer is not marked as opaque.

NOTRY=True
-- gammatext flake?

Review URL: https://codereview.chromium.org/719253002
2014-11-13 12:41:02 -08:00
Florin Malita
66b4ce9373 Fully disable lcdtextprops
R=reed@google.com
TBR=jcgregorio@google.com, reed@google.com

Review URL: https://codereview.chromium.org/723253002
2014-11-13 15:00:03 -05:00
cdalton
3fc6a2fdb2 Combine similar DrawPaths calls in GrInOrderDrawBuffer
Combines adjacent DrawPaths commands into one single call when a
conservative set of conditions are met. The end result is that whole
paragraphs can be drawn with a single call to
gliStencilThenCoverFillPathInstancedNV(), rather than one call for
each line.

BUG=skia:

Review URL: https://codereview.chromium.org/712223002
2014-11-13 11:54:20 -08:00
fmalita
f4905ccb6c Disable GM:lcdtextprops on 565
The new GM is failing on 565/pipe. Disabling to get the tree green.

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

Review URL: https://codereview.chromium.org/722153004
2014-11-13 11:29:07 -08:00
mtklein
dfd5f6edf8 Revert of Deparameterize SkVarAlloc. (patchset #6 id:100001 of https://codereview.chromium.org/721313002/)
Reason for revert:
Unit test failures on 32-bit machines.

test Record_Alignment: ../../tests/RecordTest.cpp:100	is_aligned(record.alloc<uint64_t>())

Original issue's description:
> Deparameterize SkVarAlloc.
>
> SkRecord performance is not sensitive to these values, so we can cut some
> storage.  This rearranges the space-remaining logic to use a count of bytes
> left rather than a pointer to the end, cutting memory usage a little more.
>
> An SkVarAlloc used to weigh 20 or 32 bytes which now becomes 16 or 24.
>
> I think if I think about it a bit more I can trim off that Block* too,
> getting us to 12 or 16 bytes.
>
> Because we now just always grow by doubling, this CL switches from storing
> fSmallest to its log base 2.  This has the nice effect of never having to worry
> about it overflowing, and means we can probably squeeze it down into a byte
> if we want, even 6 bits.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/bc415389855888af5a1282ca4b6bee30afa3d69d

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

Review URL: https://codereview.chromium.org/718203006
2014-11-13 11:23:36 -08:00
bungeman
e454327d73 Roll gyp.
Summary of changes available at:
3917682a16..f1c42f73e4

Review URL: https://codereview.chromium.org/724883002
2014-11-13 11:21:30 -08:00
djsollen
e4545210c9 Cleanup GrContextFactory and make it's subclasses private
Review URL: https://codereview.chromium.org/723183002
2014-11-13 11:12:41 -08:00
caryclark
912c9ec6ee disable a couple of new fuzz378 tests on android
these tests fail on a nexus 9 in release only. It's probably related
to the fused multiply-add instruction

TBR=

Review URL: https://codereview.chromium.org/722303002
2014-11-13 11:08:52 -08:00
egdaniel
b6cbc38702 Add GrProcOptInfo class to track various output information for color and coverage stages.
BUG=skia:

Review URL: https://codereview.chromium.org/719203002
2014-11-13 11:00:34 -08:00
mtklein
bc41538985 Deparameterize SkVarAlloc.
SkRecord performance is not sensitive to these values, so we can cut some
storage.  This rearranges the space-remaining logic to use a count of bytes
left rather than a pointer to the end, cutting memory usage a little more.

An SkVarAlloc used to weigh 20 or 32 bytes which now becomes 16 or 24.

I think if I think about it a bit more I can trim off that Block* too,
getting us to 12 or 16 bytes.

Because we now just always grow by doubling, this CL switches from storing
fSmallest to its log base 2.  This has the nice effect of never having to worry
about it overflowing, and means we can probably squeeze it down into a byte
if we want, even 6 bits.

BUG=skia:

Review URL: https://codereview.chromium.org/721313002
2014-11-13 10:51:39 -08:00
reed
a3aff06d83 add gm for lcd text and surfaceprops
BUG=skia:

Review URL: https://codereview.chromium.org/727543002
2014-11-13 10:40:58 -08:00
fmalita
6987dcaf25 Rename onCreateDevice -> onCreateCompatibleDevice
This is a port of https://codereview.chromium.org/723743002/ with the
following changes:

* drop the legacy onCreateDevice variant completely
* also convert SkXPSDevice & SkGatherPixelRefsAndRects to the new API

This is expected to break canaries and will require a manual/cowboy
roll.

TBR=reed@google.com
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/720213002
2014-11-13 08:33:37 -08:00
jcgregorio
3b27adef0a Revert of Make nanobench and dm be usable from Chromium build (patchset #5 id:80001 of https://codereview.chromium.org/657373002/)
Reason for revert:
Causing breakages on Mac build.

Original issue's description:
> Make nanobench and dm be usable from Chromium build
>
> Move the app logic for each app as follows:
>
> <app>.cpp -- the file which contains main(). Embedders that compile
> their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.
>
> <app>_main.cpp -- the main logic of the Skia test application. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> <app>_main.h -- the API for the main logic. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> This way (the upcoming) Chromium dm can setup its Chromium-specific setup
> in custom main(), and then call dm_main(), without the need of any
> SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/c092d3bdab5f723576cc0346cea3ee282a9cb444

TBR=mtklein@chromium.org,mtklein@google.com,borenet@google.com,kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/724073002
2014-11-13 08:06:40 -08:00
jcgregorio
1c6e7571d4 Revert of Fix build for iOS after "Make nanobench and dm be usable from Chromium build" (patchset #1 id:1 of https://codereview.chromium.org/716413003/)
Reason for revert:
Causes breakages on Mac.

Original issue's description:
> Fix build for iOS after "Make nanobench and dm be usable from Chromium build"
>
> Fix build for iOS after "Make nanobench and dm be usable from Chromium
> build"
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/0935aed2787eb79629125bdfef9aba2a6a283ef7

TBR=robertphillips@google.com,kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/724813002
2014-11-13 07:58:01 -08:00
caryclark
65f553182a These tests stress pathops by describing the union of circle-like paths that have tiny line segments embedded and double back to create near-coincident conditions.
The fixes include
- detect when finding the active top loops between two possible answers
- preflight chasing winding to ensure answer is consistent
- binary search more often when quadratic intersection fails
- add more failure paths when an intersect is missed

While this fixes the chrome bug, reenabling path ops in svg should be deferred until additional fixes are landed.

TBR=
BUG=421132

Committed: https://skia.googlesource.com/skia/+/6f726addf3178b01949bb389ef83cf14a1d7b6b2

Review URL: https://codereview.chromium.org/633393002
2014-11-13 06:58:52 -08:00
egdaniel
b1cff03325 Relax constraints on src coeff in GrDrawState::willBlendWithDst.
Allow the srcCoeff to be anything as long as it does not reference the dst. Previous version
required srcCoeff to be one.

BUG=skia:

Review URL: https://codereview.chromium.org/718103003
2014-11-13 06:19:25 -08:00
skia.buildbots
ec2d28554a Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=

Review URL: https://codereview.chromium.org/722223002
2014-11-13 06:18:57 -08:00
kkinnunen
0935aed278 Fix build for iOS after "Make nanobench and dm be usable from Chromium build"
Fix build for iOS after "Make nanobench and dm be usable from Chromium
build"

BUG=skia:2992

Review URL: https://codereview.chromium.org/716413003
2014-11-13 06:00:45 -08:00
kkinnunen
6438f9aca7 Fix debugger with GL to work with non-default locale
QApplication forces the process to use the C locale system on
"Unix/Linux" according to the docs.

The float numbers in GL shaders will be printed with printf. These will
be formatted with comma in certain locales, like LC_NUMERIC=fi_FI.UTF-8.

Force the NC_NUMERIC=C before running the QApplication.

Review URL: https://codereview.chromium.org/724753002
2014-11-13 05:13:50 -08:00
kkinnunen
c092d3bdab Make nanobench and dm be usable from Chromium build
Move the app logic for each app as follows:

<app>.cpp -- the file which contains main(). Embedders that compile
their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.

<app>_main.cpp -- the main logic of the Skia test application. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

<app>_main.h -- the API for the main logic. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

This way (the upcoming) Chromium dm can setup its Chromium-specific setup
in custom main(), and then call dm_main(), without the need of any
SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.

BUG=skia:2992

Review URL: https://codereview.chromium.org/657373002
2014-11-13 05:00:57 -08:00
reed
5adbf1b579 Revert of move to modify onCreateDevice virtual (patchset #2 id:20001 of https://codereview.chromium.org/723743002/)
Reason for revert:
mac_chromium_rel_ng unittest failures. speculating caused by this cl.

http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/5262

Original issue's description:
> start to replace onCreateDevice with onCreateCompatibleDevice
>
> the new virtual takes a struct which we can amend in the future w/o having to
> update our subclasses in chrome.
>
> BUG=skia:
> NOTRY=True
>
> Committed: https://skia.googlesource.com/skia/+/b122ee50fb56cf6669fe1668b82c8815896e9943

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

Review URL: https://codereview.chromium.org/728433002
2014-11-13 03:31:41 -08:00
mtklein
8113dd1369 SkVarAlloc
Like SkChunkAlloc, but
  - does its allocation with better sympathy for malloc granularity;
  - the fast path inlines entirely;
  - smaller per-block overhead;
  - smaller per-SkVarAlloc overhead;
  - growth parameters are a little more tunable.

Its main downside is less flexibility; it supports fewer methods than SkChunkAlloc.

These current parameters bring the first allocation down from 4K to 1K,
without affecting recording time on my desktop.  skiaperf.com will tell the
whole story.

BUG=skia:

Review URL: https://codereview.chromium.org/674263002
2014-11-12 15:15:28 -08:00
reed
b122ee50fb start to replace onCreateDevice with onCreateCompatibleDevice
the new virtual takes a struct which we can amend in the future w/o having to
update our subclasses in chrome.

BUG=skia:
NOTRY=True

Review URL: https://codereview.chromium.org/723743002
2014-11-12 14:31:11 -08:00
mtklein
e069400cab Restore bitmap dedup in SkPictureRecord. Cuts RAM usage of DM by half.
This should fix our failing 32-bit test bots.

BUG=skia:

Review URL: https://codereview.chromium.org/715423003
2014-11-12 12:49:47 -08:00