Commit Graph

14866 Commits

Author SHA1 Message Date
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
egdaniel
90ace96cbb Rebase gm's for first time that were in no-comparion
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/715363006
2014-11-12 12:12:50 -08:00
scroggo
8338a9a855 Reland "Move from libstlport to libc++ for Android framework builds" (patchset #1 id:1 of https://codereview.chromium.org/718793003/)
> Original issue's description:
> > Move from libstlport to libc++ for Android framework builds
> >
> > Committed: https://skia.googlesource.com/skia/+/ce259510a738fab05a0d456440104f5aba1c9d72
>
> TBR=tomhudson@google.com,djsollen@google.com
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/3c3fe7ce4893204eb8bcf885e8a1d539763bca5d

TBR=tomhudson@google.com,djsollen@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/717303002
2014-11-12 11:52:23 -08:00
reed
09a79d0998 cleanup comments
BUG=skia:

Review URL: https://codereview.chromium.org/715233005
2014-11-12 11:42:53 -08:00
bsalomon
395ef0568d Fix use of NULL ptr in GrContext::drawRect
BUG=skia:3122
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/724443002
2014-11-12 11:35:22 -08:00
bungeman
06fc5cf206 Rebaseline for s4-Debug for 6fee786210. 2014-11-12 14:21:28 -05:00
bsalomon
69ed47f42d Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual impl
BUG=skia:2889

Review URL: https://codereview.chromium.org/702413003
2014-11-12 11:13:39 -08:00
mtklein
703d3c7093 Followup: remove unnecessary SkTRefArray
BUG=skia:

Review URL: https://codereview.chromium.org/719113004
2014-11-12 11:08:20 -08:00
bsalomon
4bf406a478 Generalize valgrind suppressions for NV driver.
Review URL: https://codereview.chromium.org/723603003
2014-11-12 10:51:19 -08:00
bsalomon
48ea202817 set key data in duplicate scratch key unit test
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/722763002
2014-11-12 10:28:17 -08:00
mtklein
71a2363707 More cleanup: streamline paths and bitmaps.
SkBitmapHeap is still used---now exclusively---by pipe.

BUG=skia:

Review URL: https://codereview.chromium.org/715413002
2014-11-12 10:24:55 -08:00
mtklein
391e318b3d Fix memory leak in BitmapHeapTest
BUG=skia:

Review URL: https://codereview.chromium.org/715383003
2014-11-12 10:09:11 -08:00
mtklein
88300a555f Follow up.
BUG=skia:

Review URL: https://codereview.chromium.org/719853002
2014-11-12 09:38:21 -08:00
robertphillips
8236591547 Rename GrAccelData to SkLayerInfo and move it to src/core
Review URL: https://codereview.chromium.org/719133002
2014-11-12 09:32:34 -08:00
reed
ac6a2f964e detect bad bitmaps during deserialization
BUG=skia:3117

Review URL: https://codereview.chromium.org/718103002
2014-11-12 09:25:25 -08:00
mtklein
257bf0f6f7 Revert of Sk4x_sse.h (patchset #18 id:330001 of https://codereview.chromium.org/698873003/)
Reason for revert:
Failing bots.

Original issue's description:
> Sk4x_sse.h
>
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e4bf793120d3bfc9b003d11880a3fb73ff2b89e9

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

Review URL: https://codereview.chromium.org/719143002
2014-11-12 09:24:24 -08:00
mtklein
a74ce853c8 Start stripping out complicated parts of SkPicture{Record,Data}.
First step: no more paint flattening or deduplication.

BUG=skia:

Review URL: https://codereview.chromium.org/723593002
2014-11-12 09:19:02 -08:00