Commit Graph

3864 Commits

Author SHA1 Message Date
reed
735f548c51 use int instead of size_t to match skia convention
BUG=skia:
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/753903002
2014-11-23 18:37:14 -08:00
mtklein
19ac76753e SkPicture::SnapshotArray doesn't really stand to benefit from refcounting.
BUG=skia:

Review URL: https://codereview.chromium.org/748803005
2014-11-21 12:20:35 -08:00
mtklein
1794651509 Switch SkBitmapProcState's SkFractionalInt to 32.32.
16 bits are not enough to hold the integral part of fx in
Clamp_S32_opaque_D32_nofilter_DX_shaderproc.

Weirdly, no GM diffs on my desktop.

BUG=skia:3096

Review URL: https://codereview.chromium.org/733163003
2014-11-21 12:10:33 -08:00
mtklein
09a22e9597 Watch out for SkFixed overflow in SkMipMap.cpp.
Tested with -fsanitize=signed-integer-overflow.
This new assert used to trigger in MipMap unit test.

Don't appear to be any GM diffs.

BUG=skia:

Review URL: https://codereview.chromium.org/729373004
2014-11-21 11:38:53 -08:00
mtklein
04038eba9f public SkNVRefCnt<SnapshotArray>
Should fix broken build.

NOTRY=true
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/748143002
2014-11-21 11:13:15 -08:00
mtklein
b7ee349f10 SkData -> SkPicture::SnapshotArray
Restores type safety with all the same features.

(Also note, less code: 29 insertions, 50 deletions.)

BUG=skia:

Review URL: https://codereview.chromium.org/746553002
2014-11-21 11:06:04 -08:00
reed
4af267b119 add SkImage::newSurface
BUG=skia:

Review URL: https://codereview.chromium.org/741763002
2014-11-21 08:46:38 -08:00
reed
41d2c2e434 simplify uniqueID code in picture
patch from issue 750003002 at patchset 1 (http://crrev.com/750003002#ps1)

BUG=skia:

Review URL: https://codereview.chromium.org/752573002
2014-11-21 08:07:41 -08:00
robertphillips
5b69377507 Add MultiPictureDraw to nanobench
I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.

TBR=bsalomon@google.com

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

Review URL: https://codereview.chromium.org/731973005
2014-11-21 06:19:36 -08:00
robertphillips
e77dadd91a Revert of Add MultiPictureDraw to nanobench (patchset #7 id:120001 of https://codereview.chromium.org/731973005/)
Reason for revert:
Needs more work

Original issue's description:
> Add MultiPictureDraw to nanobench
>
> I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.
>
> TBR=bsalomon@google.com
>
> Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe

TBR=mtklein@google.com,bsalomon@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/750583002
2014-11-21 05:50:21 -08:00
robertphillips
0ddad31012 Add MultiPictureDraw to nanobench
I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/731973005
2014-11-21 05:35:54 -08:00
Florin Malita
844aa334a4 Add SkNVRefCnt::getRefCnt()
Used in Blink unit tests.

TBR=mtklein@google.com,humper@google.com

Review URL: https://codereview.chromium.org/746693002
2014-11-20 16:56:22 -05:00
fmalita
2d97bc139a Disable LCD text explicitly in SkPictureImageFilter::onFilterImage()
As an intermediate fix for
https://code.google.com/p/skia/issues/detail?id=3142, we can use a
non-public SkCanvas constructor and force-disable LCD text.

BUG=skia:3142
R=reed@google.com,senorblanco@google.com

Review URL: https://codereview.chromium.org/725243004
2014-11-20 10:44:58 -08:00
mtklein
d6ab2a8e45 Add SkNVRefCnt::deref().
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/744853002
2014-11-20 10:07:54 -08:00
bsalomon
b03c4a35bd Don't use NULL GrOptDrawState to indicate that draw should be skipped.
Review URL: https://codereview.chromium.org/742853002
2014-11-20 09:56:11 -08:00
mtklein
08d1fccf6e Add SkNVRefCnt, prune down SkPicture's size
SkNVRefCnt is a variant of SkRefCnt that's Not Virtual, so weighs 4 bytes
instead of 8 or 16.  There's only benefit to doing this if the deriving class
does not otherwise need a vtable, e.g. SkPicture.

I've stripped out some cruft from SkPicture, rearranged fields to pack tightly,
and added compile asserts for the sizes of SkPicture, SkRecord, and
SkVarAlloc.

BUG=skia:3144

Review URL: https://codereview.chromium.org/741793002
2014-11-20 09:18:32 -08:00
bsalomon
072803144a Stop overloading internal_dispose in SkTextBlob and SkData
Review URL: https://codereview.chromium.org/737093002
2014-11-20 08:02:46 -08:00
tomhudson
158fcaa031 Implement SkPicture::bytesUsed() for SkRecord backend
BUG=chromium:230419
R=mtklein@google.com,reed@google.com

Review URL: https://codereview.chromium.org/490253003
2014-11-19 10:41:14 -08:00
mtklein
48b411af76 Remove debug-only fData from SKTDArray.
It makes the code harder to read, and makes Debug and Release SkTDArrays
different sizes.  Looks like fData is left over from when debuggers weren't
very good at inspecting data structures.

No API changes.
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/739263002
2014-11-19 09:41:27 -08:00
joshualitt
02bcd9db00 move GrGeometryProcessor to src
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/739943003
2014-11-19 08:24:09 -08:00
bsalomon
ae59b77612 Create GrOptDrawState before recording draw in GrInOrderDrawBuffer
Review URL: https://codereview.chromium.org/739673002
2014-11-19 08:23:49 -08:00
reed
78e2768897 Allow pictures to have a full bounds
This reverts commit 7c4cdd2c5b.

BUG=skia:

Review URL: https://codereview.chromium.org/738083002
2014-11-19 08:04:34 -08:00
reed
7c4cdd2c5b Revert of allow pictures to have a full bounds (patchset #3 id:40001 of https://codereview.chromium.org/736583004/)
Reason for revert:
needed to update legacy width() helpers

Original issue's description:
> allow pictures to have a full bounds
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7e76bff26e7c74902841ca4f607eb0b24a833a4a

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

Review URL: https://codereview.chromium.org/722043005
2014-11-19 07:17:17 -08:00
reed
7e76bff26e allow pictures to have a full bounds
BUG=skia:

Review URL: https://codereview.chromium.org/736583004
2014-11-19 06:59:41 -08:00
egdaniel
ec03a46080 Add processor name to comment when printing out shaders.
BUG=skia:

Review URL: https://codereview.chromium.org/735153002
2014-11-19 06:22:39 -08:00
reed
b07a94f1cb add roundOut that returns its result
BUG=skia:

Review URL: https://codereview.chromium.org/742663002
2014-11-19 05:03:18 -08:00
reed
d02cf2664d change roundOut() to take a dst, so we can use that signature to return IRect
BUG=skia:
TBR=robertphilips

Review URL: https://codereview.chromium.org/731373003
2014-11-18 18:06:45 -08:00
joshualitt
7eb8c7b00a drawinfo carries bufferinfo
BUG=skia:

Review URL: https://codereview.chromium.org/737723003
2014-11-18 14:24:27 -08:00
halcanary
6fd5e6e261 http://skbug.com/3130 step 4 (include/utils/SkWGL.h gone for good)
BUG=skia:3130

Review URL: https://codereview.chromium.org/729363003
2014-11-18 11:30:20 -08:00
reed
6be2aa9a25 wip for drawables
Idea:

1. in its mutable recording state, keep a table of drawables on the side, and store an index in the record list.

2. In "immediate-mode" draw, just call the clients drawable directly (need access to our private list to turn the stored index into a proc)

3. when we "snap", we replace the list of drawables with a list of (sub) pictures, and then during playback of the snapped picture, we invoke a private drawable which just calls "drawPicture" on the index'd subpicture.

Review URL: https://codereview.chromium.org/727363003
2014-11-18 11:08:05 -08:00
joshualitt
9853ccef19 Drawstate on stack
BUG=skia:

Review URL: https://codereview.chromium.org/732693002
2014-11-17 14:22:49 -08:00
bsalomon
84c8e62fad Allow GPU resources to not be counted against the cache budget.
BUG=skia:2889

Review URL: https://codereview.chromium.org/721353002
2014-11-17 09:33:27 -08:00
mtklein
c6ad9eefa0 More SkPicture cleanup
- move field declarations together and pack them a little tighter
 - get rid of fData
 - remove dead code in debugger, including unused SkPicturePlayback subclass

There are now no more long-lived SkPictureData!  (Really, there never were,
but now we don't pretend to support them.)

BUG=skia:

No API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/725143002
2014-11-17 06:45:18 -08:00
Greg Humphreys
21c771b3fc Revert "move SkPDFD*.h from include to src"
This reverts commit 693024300f.

was breaking canary build

BUG=skia:

Review URL: https://codereview.chromium.org/731173002
2014-11-17 09:42:09 -05:00
halcanary
693024300f move SkPDFD*.h from include to src
BUG=278148

Review URL: https://codereview.chromium.org/727343002
2014-11-17 06:26:21 -08:00
reed
73c2501120 separate c headers
BUG=skia:

Review URL: https://codereview.chromium.org/728323002
2014-11-17 06:15:42 -08:00
halcanary
6dd03c899f Fix Chromium roll broken by http://crrev.com/728823002
Review URL: https://codereview.chromium.org/727783004
2014-11-14 17:22:05 -08:00
bsalomon
12299ab7a1 Make GrResourceCache2 responsible for calling release, abandon, and ~.
BUG=skia:2889

TBR=robertphillips@google.com

NOTRY=true

Review URL: https://codereview.chromium.org/729683002
2014-11-14 13:33:09 -08:00
halcanary
85588344c3 SkDocument SK_API
Review URL: https://codereview.chromium.org/726073002
2014-11-14 13:24:18 -08:00
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
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
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
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
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