mtklein
52c293547b
Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.
...
This was needed for pictures before v33, and we're now requiring v35+.
Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc
BUG=skia:
Review URL: https://codereview.chromium.org/769953002
2014-12-01 10:23:11 -08:00
cdalton
20b373cf31
Add color emoji fallback for nvpr text
...
BUG=skia:
Review URL: https://codereview.chromium.org/759613005
2014-12-01 08:38:55 -08:00
mtklein
5c9c9be1f5
Force path bounds in recording.
...
The use of SKTRacy isn't safe in SkPathRef.
There are logical dependencies between the racy fields.
Doesn't seem to affect recording performance:
$ c --match skp --config nonrendering
tabl_techmeme.skp 81.1us -> 86us 1.06x
desk_mapsvg.skp 1.23ms -> 1.26ms 1.02x
desk_yahooanswers.skp 114us -> 117us 1.02x
tabl_sahadan.skp 70.9us -> 72us 1.02x
desk_fontwipe.skp 31.6us -> 32us 1.01x
tabl_cuteoverload.skp 414us -> 419us 1.01x
desk_mobilenews.skp 503us -> 508us 1.01x
desk_tigersvg.skp 150us -> 152us 1.01x
desk_samoasvg.skp 608us -> 610us 1x
tabl_digg.skp 636us -> 638us 1x
tabl_pravda.skp 155us -> 156us 1x
desk_jsfiddlehumperclip.skp 33.9us -> 33.9us 1x
tabl_culturalsolutions.skp 295us -> 295us 1x
desk_youtube.skp 447us -> 448us 1x
desk_gws.skp 144us -> 144us 1x
tabl_frantzen.skp 42us -> 42us 1x
tabl_gspro.skp 50.1us -> 50us 1x
tabl_googlecalendar.skp 165us -> 165us 1x
desk_twitter.skp 359us -> 358us 1x
desk_wordpress.skp 588us -> 583us 0.99x
desk_jsfiddlebigcar.skp 32.8us -> 32.5us 0.99x
desk_booking.skp 838us -> 827us 0.99x
tabl_androidpolice.skp 1.42ms -> 1.4ms 0.99x
desk_blogger.skp 378us -> 372us 0.98x
desk_wowwiki.skp 1.11ms -> 1.09ms 0.98x
tabl_cnet.skp 115us -> 112us 0.97x
desk_silkfinance.skp 57.7us -> 55.9us 0.97x
tabl_cnn.skp 136us -> 131us 0.97x
desk_sfgate.skp 396us -> 377us 0.95x
tabl_deviantart.skp 107us -> 102us 0.95x
tabl_mozilla.skp 1.4ms -> 1.32ms 0.94x
BUG=437511
Review URL: https://codereview.chromium.org/762313002
2014-12-01 06:59:55 -08:00
mtklein
88fd0fbccc
Bump min picture version.
...
Chrome Stable is M39, which produces picture format v35:
https://chromium.googlesource.com/skia/+/chrome/m39/include/core/SkPicture.h
We don't need any code to deal with pictures older than v35.
(When M40 goes stable, we can step up to v37, the current latest version.)
BUG=skia:
Review URL: https://codereview.chromium.org/770703002
2014-12-01 06:56:38 -08:00
scroggo
f3ca41c723
Add an Android-framework-only stable ID to SkPixelRef.
...
BUG:b/18245805
Review URL: https://codereview.chromium.org/752203002
2014-11-25 13:42:12 -08:00
mtklein
21180e2651
Revert of Blink hasn't rolled yet, better. (patchset #1 id:1 of https://codereview.chromium.org/758693002/ )
...
Reason for revert:
Try again, for real.
Original issue's description:
> Blink hasn't rolled yet, better.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/89ff0846fd9dacf5f081373746624d450a5f8c26
TBR=mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/754303004
2014-11-25 07:30:19 -08:00
reed
26a6bf6a26
free up picturerecorder refs after returning picture or drawable
...
this just accelerates what would happen on the next beginRecording() call or the destructor. chrome has unittests that break (shaders on the stack) if we hold on to the internals past endRecording().
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/758813002
2014-11-24 19:59:23 -08:00
reed
1bdfd3f4f0
option to return drawable from recording
...
patch from issue 747033005 at patchset 80001 (http://crrev.com/747033005#ps80001 )
BUG=skia:
Review URL: https://codereview.chromium.org/732653004
2014-11-24 14:41:51 -08:00
Mike Klein
89ff0846fd
Blink hasn't rolled yet, better.
...
BUG=skia:
Review URL: https://codereview.chromium.org/758693002
2014-11-24 17:31:54 -05:00
mtklein
a2a5cd4405
Revert of Blink hasn't rolled yet. (patchset #1 id:1 of https://codereview.chromium.org/754133002/ )
...
Reason for revert:
Not thorough enough.
Original issue's description:
> Blink hasn't rolled yet.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/fa14113d0563686af9f7e2d8e041dd7bf538cfa2
TBR=mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/752303002
2014-11-24 14:28:55 -08:00
reed
3c850c561f
restore old convention of asserting refcnt==1 in destructor
...
BUG=skia:
Review URL: https://codereview.chromium.org/757563003
2014-11-24 14:13:55 -08:00
Mike Klein
fa14113d05
Blink hasn't rolled yet.
...
BUG=skia:
Review URL: https://codereview.chromium.org/754133002
2014-11-24 16:26:15 -05:00
mtklein
bbb61d7268
make SkRefCnt::getRefCnt() debug-only, remove it from SkNVRefCnt.
...
Only (unused) API removed.
TBR=reed@google.com
BUG=skia:3160
Review URL: https://codereview.chromium.org/752263002
2014-11-24 13:09:39 -08:00
reed
90d0ff013b
add some debugging to SkNVRefCnt
...
BUG=skia:
Review URL: https://codereview.chromium.org/745383003
2014-11-24 12:02:31 -08:00
scroggo
01c412e40a
Remove android-framework-only unused parameter.
...
Allows -Werror=unused-parameter to build on android framework.
Review URL: https://codereview.chromium.org/757633002
2014-11-24 09:05:35 -08:00
mtklein
04c9695055
Remove Picture deletion listeners.
...
Looks like we can just have ~SkPicture put the message on the bus directly.
BUG=skia:3144
Review URL: https://codereview.chromium.org/751663002
2014-11-24 08:20:58 -08:00
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
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
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
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
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
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
halcanary
85588344c3
SkDocument SK_API
...
Review URL: https://codereview.chromium.org/726073002
2014-11-14 13:24:18 -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
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
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
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
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
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
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
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
robertphillips
4e8e3421aa
Move SkRecordComputeLayers and CollectLayers into SkRecordDraw.cpp
...
Rather then exposing parts of FillBounds (as in Expose FillBounds to allow GrPictureUtils::CollectLayers to be layered on top of it - https://codereview.chromium.org/698643002/ ), this CL moves CollectLayers into SkRecordDraw.cpp to accomplish the layering.
Review URL: https://codereview.chromium.org/716913003
2014-11-12 06:46:08 -08:00
reed
6a070dc06a
experimental
...
BUG=skia:
Review URL: https://codereview.chromium.org/716793004
2014-11-11 19:36:10 -08:00
robertphillips
81f71b6630
Change where layer hoisting data is gathered
...
This CL:
1) removes the EXPERIMENTAL_optimize on SkCanvas & SkDevice
2) moves the saveLayer gathering step to endRecording
3) Replaces GPUOptimize with SkRecordComputeLayers
4) Update bench_pictures & render_pictures to provide the new flag
#2 also necessitated moving the BBH computation (and record optimization) out of SkPicture's ctor (and into endRecording)
Review URL: https://codereview.chromium.org/718443002
2014-11-11 04:54:49 -08:00
scroggo
207a1c96ee
Remove outdated comment in SkImageDecoder.h
...
The comment was no longer relevant with
https://codereview.chromium.org/483593002
Review URL: https://codereview.chromium.org/715673002
2014-11-10 14:18:24 -08:00
reed
7c74885e01
flag imageinfo as srgb
...
intended uses:
- flag a SkSurface as sRGB (only supported by Ganesh for now)
- flag images (e.g. png or jpeg) as sRGB if the codec tells us that
wins:
- faster gamma-correct text (esp. w/ distance-fields) when we can use sRGB for text
- better color fidelity when the screen really is sRGB
Review URL: https://codereview.chromium.org/676883003
2014-11-10 08:57:21 -08:00
robertphillips
6beeb8f3cc
Small refactoring of layer discovery code
...
This CL removes CollectLayers' reliance on having the top most picture (by removing the unused fPictureID member). This then allows making CollectLayers' API closer to that of SkRecordFillBounds in order to facilitate using them interchangeably.
Review URL: https://codereview.chromium.org/714533002
2014-11-10 08:48:29 -08:00
reed
d23f45d047
document the SkStrAppend methods
...
BUG=skia:
Review URL: https://codereview.chromium.org/709063002
2014-11-07 07:37:33 -08:00
mtklein
e974c6244c
Whitelist intentionally racy TRACE_EVENT reads and writes.
...
Chrome's tracing framework appears to be intentionally racy on its
quick-reject checks, trading some data loss for better performance
when disabled. People will never notice the data loss, but TSAN does.
Let's assuage TSAN with some annotations.
The 'volatile' val in SK_ANNOTATE_UNPROTECTED_WRITE was making this
not compile, but that volatile doesn't really make sense there: the value we're
writing is not what we care about, it's the destination.
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot
No API changes.
TBR=reed
BUG=skia:
Review URL: https://codereview.chromium.org/702883002
2014-11-05 08:03:27 -08:00
tfarina
f6e59b5035
Cleanup: Remove unused InstallNewHandler() function from SkGraphics.
...
BUG=None
TEST=None
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/701813006
2014-11-05 07:20:51 -08:00
robertphillips
9f2251c73e
Crop the fast path dashed lines to the cull rect
...
Without:
maxrss loops min median mean max stddev samples config bench
56M 1 13.3ms 13.6ms 13.6ms 14.2ms 2% Ooooo..... 8888 GM_dashing5_bw
56M 13 390us 417us 416us 459us 5% ooooO..o.o gpu GM_dashing5_bw
56M 1 13.4ms 13.9ms 14.1ms 15ms 3% Oooo..ooOo 8888 GM_dashing5_aa
56M 13 402us 421us 416us 425us 2% Ooo.ooOOOO gpu GM_dashing5_aa
With:
40M 1 1.53ms 1.54ms 1.54ms 1.55ms 0% oo.O...o.. 8888 GM_dashing5_bw
40M 12 407us 412us 415us 445us 3% ...Oo..... gpu GM_dashing5_bw
40M 1 1.7ms 1.7ms 1.7ms 1.72ms 0% o.O....... 8888 GM_dashing5_aa
43M 13 405us 409us 409us 415us 1% ooo.Ooo..o gpu GM_dashing5_aa
The GM images (including the new one) are the same with and without this CL.
BUG=428296
Review URL: https://codereview.chromium.org/699623003
2014-11-04 13:33:50 -08:00
jvanverth
f7007b023d
Enable distance field path rendering in Chrome.
...
- Add stat tracking for df-renderable paths
- Modify GPU rasterization veto to account for df-renderable paths
- Remove #define hiding df paths from Chromium and Android
BUG=skia:2935
Review URL: https://codereview.chromium.org/685113003
2014-11-04 07:59:01 -08:00
fmalita
7c11aadd82
Export (SK_API) SkSurfaceProps
...
R=reed@google.com
Review URL: https://codereview.chromium.org/693973003
2014-11-03 17:07:36 -08:00
qiankun.miao
fb502f072f
Optimize SkRect::sort()
...
This optimization can reduce comparison and assignments. For
geo_rect_sort benchmark, performance improved to 1.63us from 3.28us.
BUG=skia:
Review URL: https://codereview.chromium.org/695443005
2014-11-03 14:34:31 -08:00
reed
bd1605905b
begin clean up for scalar is double option
...
BUG=skia:
Review URL: https://codereview.chromium.org/694693002
2014-10-31 06:55:41 -07:00
robertphillips
d8aa7b74c8
Upgrade GPUOptimize
...
This will be a bit hairy to review.
The FillBounds and CollectLayers code has diverged significantly resulting in the rendering path seeing different bounds than the hoisting path. This CL merges the FillBounds changes into CollectLayers. A follow on CL will, hopefully, find a way to layer CollectLayers on top of FillBounds.
The only code in CollectLayers that is different from FillBounds is bracketed by "LAYER HOISTING" comments.
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/685263004
2014-10-30 16:45:02 -07:00
halcanary
902d4d18de
Add SkDocument::getStream() method.
...
Motivation: SkDocument_PDF can be refactored to stream all
PDF objects as SkCanvas calls are made, to save memory!
BUG=skia:3030
BUG=skia:2683
Review URL: https://codereview.chromium.org/691783002
2014-10-30 11:29:00 -07:00
mtklein
e71cd54ed4
SkTaskGroup::batch(fn, args, N)
...
Porting QuiltTask isn't important in itself; this is mostly an API feeler.
BUG=skia:
Review URL: https://codereview.chromium.org/689673003
2014-10-29 14:17:13 -07:00
reed
89889b6939
MultiPictureDraw is taskgroup aware.
...
SampleApp is multipicturedraw aware.
BUG=skia:
Review URL: https://codereview.chromium.org/684923002
2014-10-29 12:36:45 -07:00
bungeman
a5cf665997
Issue acquire barrier in SkRefCnt::unique().
...
When unique() returns true, it must also issue an acquire barrier.
Note that this change may adversly impact SkPath performance,
but editing SkPaths is already a performance issue.
BUG=chromium:258499
No API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/687293002
2014-10-29 12:31:33 -07:00
junov
ed53742e92
Add SK_API to global scope operators of SkMatrix
...
Review URL: https://codereview.chromium.org/678153002
2014-10-28 07:14:58 -07:00
halcanary
f622a6c8fd
Add SkIRect bounds()
convenience method to SkImageInfo and SkBitmap.
...
Review URL: https://codereview.chromium.org/646213003
2014-10-24 12:54:53 -07:00
jvanverth
b3eb687f8a
Set temporary paths volatile so we don't cache them.
...
Any path that is generated frame-to-frame should not be rendered by using the
DistanceFieldPathRenderer, because generating the initial distance field,
uploading it and rendering it takes longer than the SoftwarePathRenderer.
BUG=skia:2935
Review URL: https://codereview.chromium.org/677463002
2014-10-24 07:12:51 -07:00
sugoi
234f036b3e
Adding an option to render only the shadow in SkDropShadowImageFilter
...
This is basically how blink uses the filter. Currently, I can't use it for "ShadowOnly" mode with the filter at all, but instead of copying the code and risking to have the codepaths diverge, I'm simply going to add the option here.
BUG=skia:
Review URL: https://codereview.chromium.org/646213004
2014-10-23 13:59:52 -07:00
djsollen
e3aee8fb7b
Remove android specific genID from SkPaint.
...
Review URL: https://codereview.chromium.org/677453002
2014-10-23 10:23:07 -07:00
reed
a0c814cffb
Add SkTypeface::getBounds()
...
mirrored from https://codereview.chromium.org/666303002/
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/676523002
2014-10-22 13:20:58 -07:00
scroggo
2a1208017d
Qualify the return value of SkImageDecoder::decode
...
Add a new enum to differentiate between a complete decode and a
partial decode (with the third value being failure). Return this
value from SkImageDecoder::onDecode (in all subclasses, plus
SkImageDecoder_empty) and ::decode.
For convenience, if the enum is treated as a boolean, success and
partial success are both considered true.
Note that the static helper functions (DecodeFile etc) still return
true and false (for one thing, this allows us to continue to use
SkImageDecoder::DecodeMemory as an SkPicture::InstallPixelRefProc in
SkPicture::CreateFromStream).
Also correctly report failure in SkASTCImageDecoder::onDecode when
SkTextureCompressor::DecompressBufferFromFormat fails.
BUG=skia:3037
BUG:b/17419670
Review URL: https://codereview.chromium.org/647023006
2014-10-22 12:07:00 -07:00
reed
727b8c1d1c
explicitly size fType in SkRRect, to ensure the are no uninitialized bytes
...
(so it can be used as a key in a cache)
BUG=skia:
Review URL: https://codereview.chromium.org/670183002
2014-10-22 11:23:56 -07:00
reed
39393e3ac3
add round/ceil/etc. for SkMScalar
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/645793006
2014-10-21 12:33:21 -07:00
senorblanco
b0e89dcc1d
Fix image filters for PDF backend.
...
Currently, the PDF backend does not support image filters (since PDF
does not have that functionality), so it simply removes them. This is
causing Chrome print preview to render incorrectly (see bug). The fix
here is to fall back to a raster device for image filters, as we used
to do in Blink. The resulting bitmap will be drawn to the destination
device as a normal main-memory-backed bitmap.
Note: this change invalidates the PDF results of all GMs containing
image filters (since they'll actually be rendered).
BUG=422144
Review URL: https://codereview.chromium.org/644323006
2014-10-20 14:03:13 -07:00
bungeman
a4c4a2d8cd
Replace SkTypeface::Style with SkFontStyle.
...
Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20
Review URL: https://codereview.chromium.org/488143002
2014-10-20 13:33:19 -07:00
mtklein
802ad83dca
Revert of Replace SkTypeface::Style with SkFontStyle. (patchset #9 id:160001 of https://codereview.chromium.org/488143002/ )
...
Reason for revert:
CrOS GM failures:
[*] 2 ExpectationsMismatch: fontmgr_iter_565.png fontmgr_iter_8888.png
Original issue's description:
> Replace SkTypeface::Style with SkFontStyle.
>
> Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20
TBR=reed@google.com ,bungeman@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/667023002
2014-10-20 12:54:31 -07:00
bungeman
43b8b36b20
Replace SkTypeface::Style with SkFontStyle.
...
Review URL: https://codereview.chromium.org/488143002
2014-10-20 12:33:59 -07:00
mtklein
dba3e64ab9
Revert of Start to vectorize SkTileGrid. (patchset #48 id:1670001 of https://codereview.chromium.org/634543004/ )
...
Reason for revert:
breaks chrome GPU debug bots
Original issue's description:
> Start to vectorize SkTileGrid.
>
> This adds Sk4x.h to help.
>
> BUG=skia:3041
>
> Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/958e9628d5f9a81aeafa78572cb4afc4b19a455a
TBR=reed@google.com ,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:3041
Review URL: https://codereview.chromium.org/637863005
2014-10-20 10:43:55 -07:00
mtklein
958e9628d5
Start to vectorize SkTileGrid.
...
This adds Sk4x.h to help.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
Review URL: https://codereview.chromium.org/634543004
2014-10-20 07:12:34 -07:00
mtklein
2348199907
Revert of Start to vectorize SkTileGrid. (patchset #45 id:1430002 of https://codereview.chromium.org/634543004/ )
...
Reason for revert:
Many GCC bots missing __builtin_shuffle, e.g. Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot.
Original issue's description:
> Start to vectorize SkTileGrid.
>
> This adds Sk4x.h to help.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170
TBR=reed@google.com ,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/663663002
2014-10-16 15:27:47 -07:00
mtklein
90c7992bfc
Start to vectorize SkTileGrid.
...
This adds Sk4x.h to help.
BUG=skia:
Review URL: https://codereview.chromium.org/634543004
2014-10-16 15:21:43 -07:00
sugoi
b227e37eae
JPEG YUV Decoding
...
Enabling JPEG YUV Decoding in Skia
BUG=skia:3005, skia:1674, skia:3029
Committed: https://skia.googlesource.com/skia/+/8e6c3b93a39e19111662a760ede97df55e51d39f
Review URL: https://codereview.chromium.org/399683007
2014-10-16 13:10:57 -07:00
jvanverth
aab626c367
Revert of Change drawText() to generate positions and send to drawPosText() (patchset #4 id:60001 of https://codereview.chromium.org/653133004/ )
...
Reason for revert:
A large number of GMs on Ubuntu12 are failing. The text layout on GPU is visibly different than that for 8888.
Original issue's description:
> Change drawText() to generate positions and send to drawPosText()
>
> The idea here is to have a central place that does layout for drawText(), and
> then always feed text through drawPosText(). This both makes all of the
> GrTextContexts consistent in drawText() output, and does a better job of
> stressing drawPosText().
>
> Because of the effect of matrices on hinting and approximation error, the
> generated text is not 100% identical to that produced by the raster pipeline.
>
> BUG=skia:2778
>
> Committed: https://skia.googlesource.com/skia/+/7851a56895c9c076f73a835a7dd51d3c6180c16f
TBR=cdalton.nvidia@gmail.com ,bungeman@google.com,reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2778
Review URL: https://codereview.chromium.org/659993003
2014-10-16 08:04:39 -07:00
jvanverth
7851a56895
Change drawText() to generate positions and send to drawPosText()
...
The idea here is to have a central place that does layout for drawText(), and
then always feed text through drawPosText(). This both makes all of the
GrTextContexts consistent in drawText() output, and does a better job of
stressing drawPosText().
Because of the effect of matrices on hinting and approximation error, the
generated text is not 100% identical to that produced by the raster pipeline.
BUG=skia:2778
Review URL: https://codereview.chromium.org/653133004
2014-10-16 06:20:35 -07:00
bungeman
8dfdfff98d
Don't use 'defined' in macro expansion.
...
A careful reading of the preprocessor specification indicates that
any use of the 'defined' operator outside the form of 'defined X' or
'defined ( X )' directly in the constant expression of a '#if' or
'#elif' may cause undefined behavior.
In particular, msvc is very unpredictable. The 'defined X' and
'defined ( X )' forms behave differently when created from marco
expansion, with 'defined ( X )' generally evaluating to '0L'. The
'defined X' form generally behaves more the way one would expect,
but still has a number of quirks which should simply be considered
undefined behavior.
BUG=chromium:419245
Review URL: https://codereview.chromium.org/657183002
2014-10-15 13:53:55 -07:00
rmistry
3ac569b37a
Revert of JPEG YUV Decoding (patchset #5 id:180001 of https://codereview.chromium.org/399683007/ )
...
Reason for revert:
Caused many test bots to go red:
http://build.chromium.org/p/client.skia/builders/Test-ChromeOS-Alex-GMA3150-x86-Release/builds/22/steps/dm/logs/stdio
http://build.chromium.org/p/client.skia/builders/Test-ChromeOS-Link-HD4000-x86_64-Debug/builds/168/steps/dm/logs/stdio
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/builds/38/steps/dm/logs/stdio
Original issue's description:
> JPEG YUV Decoding
>
> Enabling JPEG YUV Decoding in Skia
>
> BUG=skia:3005, skia:1674
>
> Committed: https://skia.googlesource.com/skia/+/8e6c3b93a39e19111662a760ede97df55e51d39f
TBR=reed@google.com ,scroggo@google.com,sugoi@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:3005, skia:1674
Review URL: https://codereview.chromium.org/656163002
2014-10-15 13:15:58 -07:00
sugoi
8e6c3b93a3
JPEG YUV Decoding
...
Enabling JPEG YUV Decoding in Skia
BUG=skia:3005, skia:1674
Review URL: https://codereview.chromium.org/399683007
2014-10-15 11:04:18 -07:00
reed
157f36d358
add tests for large cordinates bounds when building aaclip
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/658753002
2014-10-15 07:05:09 -07:00
mtklein
148ec59001
Require SK_DECLARE_STATIC_LAZY_PTR is used in global scope.
...
Function- or method- local scope isn't threadsafe; the pointer is generally
zero-initialized on first use in function scope (i.e. lazily... we have to go
deeper), but for globals we can be pretty sure the linker will do that for us.
BUG=skia:
No public API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/651723003
2014-10-13 13:17:56 -07:00
tfarina
a5414c4a8e
Turn SkCanvasStateUtils into a class with static functions.
...
That simplifies the way to declare it a friend, as needed in SkCanvas.
BUG=skia:2914
TEST=make most
R=reed@google.com
Review URL: https://codereview.chromium.org/645773002
2014-10-10 06:19:09 -07:00
reed
40636a5303
faster SkRect::sort
...
BUG=skia:
Review URL: https://codereview.chromium.org/646863002
2014-10-10 05:50:15 -07:00
mtklein
092dab9822
Use BBH reserve hook to preallocate space for tiles.
...
Before getting too far into changing how SkTileGrid stores its tiles, I figured I'd
better see how much I can tweak out the existing format. Cleverly, that way
any improvements I make by changing the format will look that much less
impressive.
This CL looks like it will be a 5-15% win in time spent recording, with no effect
on playback.
This CL also shrinks the tiles to fit exactly when we're done inserting,
using newly added SkTDArray::shrinkToFit(). It's quite cheap to run (maybe
taking back 1-2% from those 5-15% wins), and means we'll lug around about 15%
fewer bytes in the tile grids. Note though this strategy temporarily uses up to
30% more memory while building the tile grid. For our largest SKPs, that's
maybe 75-100K extra.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/52455cbc02d7f480d988ae7cdacc11ad69078c2c
CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot
Review URL: https://codereview.chromium.org/639823005
2014-10-09 18:22:41 -07:00
reed
1119c87065
cleanup and optimize rect intersect routines
...
BUG=skia:
Review URL: https://codereview.chromium.org/640723004
2014-10-09 14:29:01 -07:00
mtklein
7062a262e2
Revert of Use BBH reserve hook to preallocate space for tiles. (patchset #2 id:80001 of https://codereview.chromium.org/639823005/ )
...
Reason for revert:
failed assertion "fXTiles * fYTiles != 0"
Original issue's description:
> Use BBH reserve hook to preallocate space for tiles.
>
> Before getting too far into changing how SkTileGrid stores its tiles, I figured I'd
> better see how much I can tweak out the existing format. Cleverly, that way
> any improvements I make by changing the format will look that much less
> impressive.
>
> This CL looks like it will be a 5-15% win in time spent recording, with no effect
> on playback.
>
> This CL also shrinks the tiles to fit exactly when we're done inserting,
> using newly added SkTDArray::shrinkToFit(). It's quite cheap to run (maybe
> taking back 1-2% from those 5-15% wins), and means we'll lug around about 15%
> fewer bytes in the tile grids. Note though this strategy temporarily uses up to
> 30% more memory while building the tile grid. For our largest SKPs, that's
> maybe 75-100K extra.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52455cbc02d7f480d988ae7cdacc11ad69078c2c
TBR=reed@google.com ,robertphillips@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/642933002
2014-10-09 13:55:20 -07:00
mtklein
52455cbc02
Use BBH reserve hook to preallocate space for tiles.
...
Before getting too far into changing how SkTileGrid stores its tiles, I figured I'd
better see how much I can tweak out the existing format. Cleverly, that way
any improvements I make by changing the format will look that much less
impressive.
This CL looks like it will be a 5-15% win in time spent recording, with no effect
on playback.
This CL also shrinks the tiles to fit exactly when we're done inserting,
using newly added SkTDArray::shrinkToFit(). It's quite cheap to run (maybe
taking back 1-2% from those 5-15% wins), and means we'll lug around about 15%
fewer bytes in the tile grids. Note though this strategy temporarily uses up to
30% more memory while building the tile grid. For our largest SKPs, that's
maybe 75-100K extra.
BUG=skia:
Review URL: https://codereview.chromium.org/639823005
2014-10-09 12:36:48 -07:00
reed
3d7d410ce5
remove dead code from SK_SUPPORT_LEGACY_IMAGECACHE_NAME
...
TBR=
Review URL: https://codereview.chromium.org/638903002
2014-10-08 06:23:29 -07:00
mtklein
fb1fe4f518
Add SkPaint::getHash().
...
BUG=skia:
Review URL: https://codereview.chromium.org/637583002
2014-10-07 09:26:10 -07:00
reed
9e96aa07db
remove unused TextBufferDirection enum
...
BUG=skia:
Review URL: https://codereview.chromium.org/621403002
2014-10-03 12:44:37 -07:00
reed
2cc22b8f2f
make SkMatrix::dump always available
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/624783002
2014-10-02 17:52:03 -07:00
reed
d1f0ebd0e2
specialize setConcat for scale+translate
...
This reverts commit 2a382f5199
.
BUG=skia:
Review URL: https://codereview.chromium.org/626583002
2014-10-02 12:58:43 -07:00
robertphillips
2a382f5199
Revert of specialize setConcat for scale+translate (patchset #1 id:1 of https://codereview.chromium.org/620433002/ )
...
Reason for revert:
Experimental to see if this revert "fixes" nanobench on the main console.
Original issue's description:
> specialize setConcat for scale+translate, helps drawText perf
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e8db3ef2a2161084fa8eb1fd1d54c35bfff52d6c
TBR=jvanverth@google.com ,reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/620973003
2014-10-02 04:42:55 -07:00
derekf
29dda80c01
Add support for EGL on linux
...
Allow setting skia_egl=1 to build skia against EGL instead of GLX on unix
Review URL: https://codereview.chromium.org/604853003
2014-10-01 10:52:52 -07:00
mtklein
8e12656096
Remove DEPRECATED_beginRecording().
...
This removes:
1) ability to record old pictures with SkPictureRecorder;
2) a couple tests specific to the old backend.
The functionality of DEPRECATED_beginRecording() now lives in
(private) SkPicture::Backport(), which is the only place we
need it now.
BUG=skia:
TBR=reed@google.com
Review URL: https://codereview.chromium.org/618303002
2014-10-01 09:29:35 -07:00
reed
10d0327c16
add SkRect::joinNonEmptyArg for faster unioning
...
BUG=skia:
Review URL: https://codereview.chromium.org/619853005
2014-10-01 09:24:12 -07:00
robertphillips
68cd2aa797
Update GrRecordReplaceDraw to use SkTDynamicHash & add ReplaceDraw
...
Having hoisted layers from different pictures invalidates the assumptions of the old GrReplacements object. This is fixed by switching to a SkTDynamicHash-based back-end.
Sub-picture-layers also require that the replacement drawing occur for the sub-pictures too. The ReplaceDraw object is added to make this happen and limit the replacement lookup to saveLayer draw commands.
This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/ ).
BUG=skia:2315
Review URL: https://codereview.chromium.org/607763008
2014-10-01 09:24:06 -07:00
reed
d9c42f71c3
optimize setRectFan and join -- from profiling drawText
...
BUG=skia:
NOTREECHECKS=True
NOTRY=True
Review URL: https://codereview.chromium.org/615993003
2014-10-01 07:21:23 -07:00
mtklein
f6fde175b8
Archive more dead code.
...
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/617003004
2014-09-30 15:22:06 -07:00
mtklein
46616af01b
Strip old backend recording down to essentials
...
Feature-wise, this removes:
1) BBH support;
2) peephole optimizations;
3) record-time text op specializations;
4) the guarantee that SkPaints are flattened.
This deletes the optimizations GM, which only exists to test the peepholes of
the old backend. SkRecord optimizations are unit tested, and if that ever fails we
can think about adding another GM like this, but they're different enough we'd
want to start from scratch anyway.
We need to keep the code that plays back the specialized text ops around for
a while for compatibility with existing .SKPs that have those ops recorded.
BUG=skia:
CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot
R=robertphillips@google.com , reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/617953002
2014-09-30 14:47:10 -07:00
mtklein
8de02f4bf3
Clean up SK_PICTURE_USE_SK_RECORD and SK_PICTURE_OPTIMIZE_SK_RECORD.
...
This folds the code through as if they were defined, which is the explicit
state in both our build and Chrome's.
This leaves the EXPERIMENTAL_ and DEPRECATED_ hooks in to be cleaned up or
privatized later.
CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot
BUG=skia:
R=reed@google.com , robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/616033002
2014-09-30 11:43:53 -07:00
mtklein
5bc760a6a6
Remove support for SkPicture::clone().
...
This folds SK_SUPPORT_LEGACY_PICTURE_CLONE through as undefined.
Chrome's not used clone() for a month or two, and we don't use it ourselves.
Don't think Android ever did.
CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot
BUG=skia:
R=reed@google.com , mtklein@google.com , robertphillips@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/620533002
2014-09-30 11:14:38 -07:00
reed
7874dc8e71
remove obsolete code for SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
...
BUG=skia:
R=reed@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/613933002
2014-09-30 10:15:32 -07:00
reed
e8db3ef2a2
specialize setConcat for scale+translate, helps drawText perf
...
BUG=skia:
R=jvanverth@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/620433002
2014-09-30 07:24:47 -07:00
reed
c5e15a1afa
remove alphatype from colortable
...
the owning bitmap is (already) responsible for knowing the alphatype
BUG=skia:
R=djsollen@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/611093002
2014-09-29 12:10:27 -07:00
fmalita
05c4a4322e
Revert of Revert of Fix SkTextBlob offset semantics. (patchset #1 id:1 of https://codereview.chromium.org/609223003/ )
...
Reason for revert:
Re-landing: Chromium-side fix to be landed with the roll (https://codereview.chromium.org/607853003/ )
Original issue's description:
> Revert of Fix SkTextBlob offset semantics. (patchset #2 id:20001 of https://codereview.chromium.org/605533002/ )
>
> Reason for revert:
> Breaking the Chrome builds with the error:
>
> [14:54:14.317833] ../../skia/ext/pixel_ref_utils.cc:221:16: error: 'drawPosText' marked 'override' but does not override any member functions
> [14:54:14.318022] virtual void drawPosText(const SkDraw& draw,
> [14:54:14.318082] ^
>
> Original issue's description:
> > Fix SkTextBlob offset semantics.
> >
> > Implement proper x/y drawTextBlob() handling by plumbing a
> > drawPosText() offset parameter (to act as an additional glyph pos
> > translation) throughout the device layer.
> >
> > The new offset superceeds the existing constY, with a minor semantic
> > tweak: whereas previous implementations were ignoring constY in 2D
> > positioning mode (scalarsPerGlyph == 2), now the offset is always
> > observed, in all positioning modes. We can do this because existing
> > drawPosText() clients always pass constY == 0 for full positioning mode.
> >
> > R=reed@google.com , jvanverth@google.com , robertphillips@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/c13bc571d3e61a43b87eb97f0719abd304cafaf2
>
> TBR=jvanverth@google.com ,reed@google.com,bsalomon@google.com,fmalita@chromium.org
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/d46b8d2bab7cfba8458432248e1568ac377429e9
R=jvanverth@google.com , reed@google.com , bsalomon@google.com , robertphillips@google.com
TBR=bsalomon@google.com , jvanverth@google.com , reed@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/607413003
2014-09-29 06:29:53 -07:00
robertphillips
ee6631ef90
Update RecordReplaceDrawTest to generate and pass pictures
...
This CL splits the unit test changes out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/ ).
For various reasons GrRecordReplaceDraw now needs to take an SkPicture (rather than an SkRecord and a BBH).
R=egdaniel@google.com , bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/608823002
2014-09-29 05:32:50 -07:00
robertphillips
d46b8d2bab
Revert of Fix SkTextBlob offset semantics. (patchset #2 id:20001 of https://codereview.chromium.org/605533002/ )
...
Reason for revert:
Breaking the Chrome builds with the error:
[14:54:14.317833] ../../skia/ext/pixel_ref_utils.cc:221:16: error: 'drawPosText' marked 'override' but does not override any member functions
[14:54:14.318022] virtual void drawPosText(const SkDraw& draw,
[14:54:14.318082] ^
Original issue's description:
> Fix SkTextBlob offset semantics.
>
> Implement proper x/y drawTextBlob() handling by plumbing a
> drawPosText() offset parameter (to act as an additional glyph pos
> translation) throughout the device layer.
>
> The new offset superceeds the existing constY, with a minor semantic
> tweak: whereas previous implementations were ignoring constY in 2D
> positioning mode (scalarsPerGlyph == 2), now the offset is always
> observed, in all positioning modes. We can do this because existing
> drawPosText() clients always pass constY == 0 for full positioning mode.
>
> R=reed@google.com , jvanverth@google.com , robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/c13bc571d3e61a43b87eb97f0719abd304cafaf2
R=jvanverth@google.com , reed@google.com , bsalomon@google.com , fmalita@chromium.org
TBR=bsalomon@google.com , fmalita@chromium.org , jvanverth@google.com , reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/609223003
2014-09-29 04:48:52 -07:00
piotaixr
5ceff913cf
Rename SkImage::draw(_, SkRect, SkRect) in SkImage::drawRect()
...
BUG=skia:2947
R=reed@google.com , junov@chromium.org
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/605843002
2014-09-26 07:36:26 -07:00
Florin Malita
c13bc571d3
Fix SkTextBlob offset semantics.
...
Implement proper x/y drawTextBlob() handling by plumbing a
drawPosText() offset parameter (to act as an additional glyph pos
translation) throughout the device layer.
The new offset superceeds the existing constY, with a minor semantic
tweak: whereas previous implementations were ignoring constY in 2D
positioning mode (scalarsPerGlyph == 2), now the offset is always
observed, in all positioning modes. We can do this because existing
drawPosText() clients always pass constY == 0 for full positioning mode.
R=reed@google.com , jvanverth@google.com , robertphillips@google.com
Review URL: https://codereview.chromium.org/605533002
2014-09-26 10:33:37 -04:00
piotaixr
d52893cfc8
Add doc on SkCanvas::drawImage*() methods
...
BUG=skia:2947
R=junov@chromium.org , reed@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/595043002
2014-09-25 14:39:40 -07:00
piotaixr
90a36e5feb
Make SkImage::draw() private
...
BUG=skia:2947
R=junov@chromium.org , reed@google.com , bsalomon@chromium.org
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/608623002
2014-09-25 14:30:57 -07:00
mtklein
610a015fda
Remove SkPaint dirty bits.
...
fDirtyBits is only used by SkPaint::FlatteningTraits, which in turn was
only used as a smaller, faster format to flatten paints in-memory to dedup
them in the old picture backend.
SkRecord obsoleted all this. Neither flatten()/unflatten() (disk format)
nor FlatteningTraits is used anywhere performance or size matters.
Here I revert the deduping code back to using the disk format for flattened paints.
We stil do have to flatten and unflatten paints while coverting from SkRecord
backend to the old backend, so we can't just delete this all yet, but any
faithful round trip flatten()/unflatten() pair will be fine, however slow.
NOTRY=true
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/604813003
2014-09-25 11:57:53 -07:00
piotaixr
b5fae93d72
SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
...
BUG=skia:2947
Committed: https://skia.googlesource.com/skia/+/432789972c1e1f8a66165c75a250dba1853efa08
R=junov@chromium.org , reed@google.com , bsalomon@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/583453002
2014-09-24 13:03:30 -07:00
borenet
2456b7681a
Revert of SkCanvas::drawImage is the new way for drawing an SkImage to a Canvas (patchset #9 id:160001 of https://codereview.chromium.org/583453002/ )
...
Reason for revert:
Broke ChromiumOS Ozone builder: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Builder/builds/4087/steps/compile/logs/stdio
Reverting to unblock DEPS roll.
Original issue's description:
> SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
>
> BUG=skia:2947
>
> Committed: https://skia.googlesource.com/skia/+/432789972c1e1f8a66165c75a250dba1853efa08
R=junov@chromium.org , reed@google.com , bsalomon@google.com , piotaixr@chromium.org
TBR=bsalomon@google.com , junov@chromium.org , piotaixr@chromium.org , reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2947
Author: borenet@google.com
Review URL: https://codereview.chromium.org/598133002
2014-09-24 11:03:35 -07:00
piotaixr
432789972c
SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
...
BUG=skia:2947
R=junov@chromium.org , reed@google.com , bsalomon@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/583453002
2014-09-23 14:10:50 -07:00
joshualitt
b0a8a377f8
Patch to create a distinct geometry processor. The vast majority of this patch
...
is just a rename. The meat is in GrGeometryProcessor, GrProcessor,
GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory,
GrProcessUnitTestFactory, and the builders
BUG=skia:
R=bsalomon@google.com
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/582963002
2014-09-23 09:50:21 -07:00
reed
4a8126e7f8
Introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/ )"
...
This reverts commit 29c857d0f3
.
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/588143004
2014-09-22 07:29:03 -07:00
reed
29c857d0f3
Revert of introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/ )
...
Reason for revert:
Broke call site in WebKit
Original issue's description:
> introduce Props to surface (work in progress)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda
R=robertphillips@google.com , bsalomon@google.com , jvanverth@google.com , bungeman@google.com , fmalita@google.com , vangelis@chromium.org , reed@google.com
TBR=bsalomon@google.com , bungeman@google.com , fmalita@google.com , jvanverth@google.com , reed@google.com , robertphillips@google.com , vangelis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/583773004
2014-09-21 10:25:07 -07:00
reed
3716fd067a
introduce Props to surface (work in progress)
...
BUG=skia:
R=robertphillips@google.com , bsalomon@google.com , jvanverth@google.com , bungeman@google.com , fmalita@google.com , vangelis@chromium.org , reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/551463004
2014-09-21 09:39:55 -07:00
fmalita
3c196def91
Souped-up SkTextBlob.
...
Refactored text blob backend for improved performance: instead of using
separate buffers for runs/positions/glyphs, everything is now packed in
a consolidated slab (including the SkTextBlob object itself!).
Benefits:
* number of allocations per blob construction reduced from ~4 to 1
(also minimizes internal fragmentation)
* run record size reduced by 8 bytes
This takes the blob construction overhead down to negligible levels
(for the current Blink uncached textblob implementation).
Unfortunately, the code is much more finicky (run merging in
particular) -- hence the assert spree.
Multi-run blobs are vulnerable to realloc storms but this is not a
problem at the moment because Blink is using one-run blobs 99% of the
time. Will be addressed in the future.
R=mtklein@google.com , reed@google.com , robertphillips@google.com
Committed: https://skia.googlesource.com/skia/+/13645ea0ea87038ebd71be3bd6d53b313069a9e4
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/581173003
2014-09-20 05:40:22 -07:00
fmalita
e50215e598
Revert of Souped-up SkTextBlob. (patchset #3 id:40001 of https://codereview.chromium.org/581173003/ )
...
Reason for revert:
Broke the new blobshader gm.
Original issue's description:
> Souped-up SkTextBlob.
>
> Refactored text blob backend for improved performance: instead of using
> separate buffers for runs/positions/glyphs, everything is now packed in
> a consolidated slab (including the SkTextBlob object itself!).
>
> Benefits:
>
> * number of allocations per blob construction reduced from ~4 to 1
> (also minimizes internal fragmentation)
> * run record size reduced by 8 bytes
>
> This takes the blob construction overhead down to negligible levels
> (for the current Blink uncached textblob implementation).
>
> Unfortunately, the code is much more finicky (run merging in
> particular) -- hence the assert spree.
>
> Multi-run blobs are vulnerable to realloc storms but this is not a
> problem at the moment because Blink is using one-run blobs 99% of the
> time. Will be addressed in the future.
>
>
> R=reed@google.com ,mtklein@google.com,robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/13645ea0ea87038ebd71be3bd6d53b313069a9e4
R=mtklein@google.com , reed@google.com , robertphillips@google.com
TBR=mtklein@google.com , reed@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/588853002
2014-09-19 19:03:06 -07:00
fmalita
13645ea0ea
Souped-up SkTextBlob.
...
Refactored text blob backend for improved performance: instead of using
separate buffers for runs/positions/glyphs, everything is now packed in
a consolidated slab (including the SkTextBlob object itself!).
Benefits:
* number of allocations per blob construction reduced from ~4 to 1
(also minimizes internal fragmentation)
* run record size reduced by 8 bytes
This takes the blob construction overhead down to negligible levels
(for the current Blink uncached textblob implementation).
Unfortunately, the code is much more finicky (run merging in
particular) -- hence the assert spree.
Multi-run blobs are vulnerable to realloc storms but this is not a
problem at the moment because Blink is using one-run blobs 99% of the
time. Will be addressed in the future.
R=mtklein@google.com , reed@google.com , robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/581173003
2014-09-19 18:37:00 -07:00
piotaixr
d49226cff3
Get rid of SkImage_Codec
...
Use SkImage_Raster with an ImageGenerator instead.
BUG=skia:2948
R=junov@chromium.org , reed@google.com , bsalomon@chromium.org
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/589713002
2014-09-19 13:30:06 -07:00
reed
65b48952d7
remove RenderTargetFlags -- NewRenderTargetDirect will never clear
...
BUG=skia:
R=robertphillips@google.com , bsalomon@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/583043002
2014-09-19 05:56:29 -07:00
cdalton
855d83ff79
Uses a single pre-baked set of paths for drawing nvpr text of a given
...
typeface. Loads the paths using the driver's glyph loading routines.
Refactors GrPathRange to accept a PathGenerator class that it uses to
lazily initialize its paths. The client code is no longer expected to
initialize the paths in a GrPathRange; instead it must provide a
PathGenerator* instance to createPathRange().
Adds a new createGlyphs() method to GrPathRendering that creates a
range of glyph paths, indexed by glyph id. GrPathRendering implements
createGlyphs() with a PathGenerator that loads glyph paths using the
skia frameworks. GrGLPathRendering uses glMemoryGlyphIndexArrayNV()
instead, when possible, to load the glyph paths.
Removes all GlyphPathRange logic from GrStencilAndCoverTextContext.
It instead uses createGlyphs().
BUG=skia:2939
R=bsalomon@google.com , jvanverth@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/563283004
2014-09-18 13:51:53 -07:00
caryclark
a10742c69c
update to accommodate latest clang in chrome toolchain
...
remove asserts for null pointers to references
change var args signature to pointer instead of array
R=mtklein@google.com , reed@android.com , reed@google.com , mtklein, reed
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/577243002
2014-09-18 11:00:40 -07:00
bungeman
d71b757573
Serialize the font index.
...
BUG=skia:1186
R=reed@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/567013002
2014-09-18 10:55:32 -07:00
bungeman
ef59adba5b
Clarify build test for presense of 'float copysign(float, float)'.
...
Clang-cl reports __cplusplus based on the version of clang instead of
reporting the __cplusplus the vc++ version _MSC_VER would.
This is important as the _MSC_VER also indicates which vc++ runtime
library will be used. As a result, do not trust the __cplusplus version
reported by clang-cl.
This change clarifies the intent of
https://skia.googlesource.com/skia/+/c34b0d4e9ad5806c1f882a1f85191f2ea8ddcdba
R=reed@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/576023003
2014-09-17 11:16:51 -07:00
reed
e010f1c2a0
hide deviceproperties, prepare the way for surfaceprops
...
BUG=skia:
NOTRY=True
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/577023002
2014-09-17 10:49:38 -07:00
bungeman
b374d6a62c
Add onGetFamilyName to SkTypeface.
...
This speeds up and documents this particular feature of SkTypeface
and also frees up SkFontDescriptor to be used only in serialization.
R=reed@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/574873002
2014-09-17 07:48:59 -07:00
reed
3375c8047e
when we disable lcd for impl reasons, add kGenA8 to document the original intent
...
BUG=skia:
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/572933004
2014-09-16 12:27:55 -07:00
caryclark
e956259c5a
add dumpHex() option to SkPath
...
This provides exact precision
to help debugging when the float
representation of a SkScalar may
introduce error.
R=reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/571973003
2014-09-15 09:26:09 -07:00
rileya
abaef86f2b
Add support for the Rec601 YUV color space to GrYUVtoRGBEffect.
...
R=bsalomon@google.com , senorblanco@chromium.org , sugoi@chromium.org , reed@google.com
Author: rileya@chromium.org
Review URL: https://codereview.chromium.org/516463005
2014-09-12 17:45:58 -07:00
ehsan.akhgari
c34b0d4e9a
Do not expect a copysign function to be defined in <cmath> with clang-cl
...
clang-cl defines __cplusplus to 201103L, but it uses the runtime library
provided by MSVC, so the copysign function will not be available there.
BUG=skia:
R=reed@google.com
Author: ehsan.akhgari@gmail.com
Review URL: https://codereview.chromium.org/526813002
2014-09-12 12:30:35 -07:00
reed
9594da111d
use SkData::NewUninitialized
...
BUG=skia:
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/565803005
2014-09-12 12:12:27 -07:00
reed
83658305a1
remove confusing/unused stream methods
...
BUG=skia:
R=bungeman@google.com , djsollen@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/563273003
2014-09-12 08:49:54 -07:00
reed
56b00d9e7a
add PurgeResourceCache to track leaks
...
TBR=halcananry
Author: reed@google.com
Review URL: https://codereview.chromium.org/554263005
2014-09-11 12:22:34 -07:00
reed
33a30503d7
SkData can allocate room for its contents in the same block
...
BUG=skia:
R=bungeman@google.com , mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/560653004
2014-09-11 08:42:36 -07:00
mtklein
aa90d00f14
Assert SkTDArray::pop() doesn't underflow.
...
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/563633003
2014-09-11 06:36:11 -07:00
bungeman
f91c47d91d
Remove a layer of indirection and code from SkFontHost.
...
R=mtklein@google.com , tomhudson@google.com , djsollen@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/105223006
2014-09-10 15:49:48 -07:00
reed
cc0e3110bd
make set3DMask virtual, so we can safely notify the shadercontext
...
also boost preallocated storage to account for this combo of bitmapshader + emboss + colorfilter
BUG=skia:
R=djsollen@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/563563002
2014-09-10 10:20:24 -07:00
reed
d954498c01
Revert of Revert of allow canvas to force conservative clips (for speed) (patchset #1 id:1 of https://codereview.chromium.org/554033003/ )
...
Reason for revert:
May just rebaseline, plus want to see the results of the chrome tests, so re-trying this CL.
Original issue's description:
> Revert of allow canvas to force conservative clips (for speed) (patchset #7 id:120001 of https://codereview.chromium.org/541593005/ )
>
> Reason for revert:
> multipicturedraw failed on nvprmsaa -- don't know why yet
>
> Original issue's description:
> > Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects:
> >
> > 1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often.
> >
> > 2. The conservative clips mean less work is done.
> >
> > 3. Enabled by default for Gpu, Record, and NoSaveLayer canvases.
> >
> > 4. API is private for now.
> >
> > Committed: https://skia.googlesource.com/skia/+/27a5e656c3d6ef22f9cb34de18e1b960da3aa241
>
> TBR=robertphillips@google.com ,bsalomon@google.com,mtklein@google.com,junov@google.com
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/6f09709519b79a1159f3826645f1c5fbc101ee11
R=robertphillips@google.com , bsalomon@google.com , mtklein@google.com , junov@google.com , reed@google.com
TBR=bsalomon@google.com , junov@google.com , mtklein@google.com , reed@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/560713002
2014-09-09 18:46:22 -07:00
reed
6f09709519
Revert of allow canvas to force conservative clips (for speed) (patchset #7 id:120001 of https://codereview.chromium.org/541593005/ )
...
Reason for revert:
multipicturedraw failed on nvprmsaa -- don't know why yet
Original issue's description:
> Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects:
>
> 1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often.
>
> 2. The conservative clips mean less work is done.
>
> 3. Enabled by default for Gpu, Record, and NoSaveLayer canvases.
>
> 4. API is private for now.
>
> Committed: https://skia.googlesource.com/skia/+/27a5e656c3d6ef22f9cb34de18e1b960da3aa241
R=robertphillips@google.com , bsalomon@google.com , mtklein@google.com , junov@google.com
TBR=bsalomon@google.com , junov@google.com , mtklein@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: reed@google.com
Review URL: https://codereview.chromium.org/554033003
2014-09-09 12:51:10 -07:00
reed
27a5e656c3
Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects:
...
1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often.
2. The conservative clips mean less work is done.
3. Enabled by default for Gpu, Record, and NoSaveLayer canvases.
4. API is private for now.
R=robertphillips@google.com , bsalomon@google.com , mtklein@google.com , junov@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/541593005
2014-09-09 12:19:30 -07:00
bsalomon
49f085dddf
"NULL !=" = NULL
...
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
reed
8f2e791baa
add SK_API to forward declare in canvas.h
...
NOTRY=True
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/541073002
2014-09-04 12:45:18 -07:00
reed
fa35f8e6eb
remove getTotalClipAsPath, privatize getTotalClip
...
R=robertphillips@google.com , djsollen@google.com
TBR=robertphilips
Author: reed@google.com
Review URL: https://codereview.chromium.org/546493002
2014-09-04 12:14:36 -07:00
robertphillips
c5ba71d2e5
Change SkPicture::draw to playback
...
R=reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/540963002
2014-09-04 08:42:50 -07:00
robertphillips
274b4ba6bd
Switch Layer Hoisting over to SkRecord backend
...
R=bsalomon@google.com
TBR=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/540543002
2014-09-04 07:24:18 -07:00
robertphillips
2ed8a75c28
Remove use of EXPERIMENTAL_getActiveOps from layer hoisting code
...
This is getting in the way of switching to the SkRecord backend and is of questionable value.
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/539693002
2014-09-03 13:46:02 -07:00
reed
e5ea500d47
Hide fields in SkImageInfo
...
R=rmistry@google.com
TBR=bsalomon
Author: reed@google.com
Review URL: https://codereview.chromium.org/536003002
2014-09-03 11:54:58 -07:00
robertphillips
d982eb22d7
Replace SkPictureReplacementPlayback with GrRecordReplaceDraw
...
I think this is sufficiently specialized to keep it in Ganesh for the time being.
R=bsalomon@google.com , mtklein@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/535953002
2014-09-03 11:04:31 -07:00
reed
2bdf1f56c3
Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/527073003/ )
...
Reason for revert:
virtual gpu failures in layouttests
http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/23717
[6:6:0903/041147:1700960503:INFO:SkBitmap.cpp(1003)] ../../third_party/skia/src/core/SkBitmap.cpp:1003: failed assertion "fPixelRef->info() == pixelRef->info()"
[6:6:0903/041147:1700961002:FATAL:SkBitmap.cpp(1003)] SK_CRASH
#0 0x7f9867df2c1e base::debug::StackTrace::StackTrace()
#1 0x7f9867e89e05 logging::LogMessage::~LogMessage()
#2 0x7f98689c4970 SkDebugf_FileLine()
#3 0x7f986870ebc6 SkBitmap::deepCopyTo()
#4 0x7f98690a3b6d blink::deepSkBitmapCopy()
#5 0x7f98690a3abe blink::ImageBuffer::copyImage()
#6 0x7f985fd4479e blink::ImageBitmap::ImageBitmap()
#7 0x7f985fd45942 blink::ImageBitmap::create()
#8 0x7f985fd84fdc blink::ImageBitmapFactories::createImageBitmap()
#9 0x7f985fd84d11 blink::ImageBitmapFactories::createImageBitmap()
#10 0x7f985ec9a7f2 blink::LocalDOMWindowV8Internal::createImageBitmap13Method()
#11 0x7f985ec96b0c blink::LocalDOMWindowV8Internal::createImageBitmapMethod()
#12 0x7f985ec91954 blink::LocalDOMWindowV8Internal::createImageBitmapMethodCallback()
#13 0x7f9869955af0 v8::internal::FunctionCallbackArguments::Call()
#14 0x7f98699833bd v8::internal::Builtin_HandleApiCall()
Original issue's description:
> Add gamma/sRGB tag to SkImageInfo
>
> This reverts commit 1cbc68f965
.
>
> requires this to land in blink https://codereview.chromium.org/531883002/
>
> Committed: https://skia.googlesource.com/skia/+/2f6abdecc5c2f21da13003c615903679abc73fc7
R=fmalita@google.com , reed@chromium.org
TBR=fmalita@google.com , reed@chromium.org
NOTREECHECKS=true
NOTRY=true
Author: reed@google.com
Review URL: https://codereview.chromium.org/535113002
2014-09-03 05:48:56 -07:00
reed
2f6abdecc5
Add gamma/sRGB tag to SkImageInfo
...
This reverts commit 1cbc68f965
.
requires this to land in blink https://codereview.chromium.org/531883002/
R=fmalita@google.com , reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/527073003
2014-09-02 21:56:40 -07:00
pkasting
280c2c6fbb
Address MSVC warnings about possible value truncation. In the process removes some apparently unused code.
...
BUG=81439
TEST=none
R=reed@google.com
Author: pkasting@chromium.org
Review URL: https://codereview.chromium.org/517763002
2014-09-02 13:40:48 -07:00
djsollen
5ee785d9c7
Remove legacy (and also broken) SkPicture constructor.
...
R=robertphillips@google.com , reed@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/532703004
2014-09-02 13:34:49 -07:00
jvanverth
17a845f760
Fix matrix similarity test on arm64
...
Addresses precision issue by using a simpler test.
Also fixes issues with IvMatrix::preservesRightAngles, and adds unit tests.
BUG=skia:2405
R=robertphillips@google.com , egdaniel@google.com , djsollen@google.com , reed@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/520123002
2014-09-02 13:15:41 -07:00
reed
848250415e
make allocPixels throw on failure
...
BUG=skia:
R=mtklein@google.com , fmalita@google.com , fmalita@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/510423005
2014-09-02 12:50:45 -07:00
robertphillips
98d709bc8d
Reorganize Layer Hoisting code
...
With the new MultiPictureDraw API the GrContext will be performing the layer hoisting (instead of the SkGpuDevice). This CL being moving the layer hoisting functionality to GrLayerHoister rather then dumping it straight into GrContext.
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/531733003
2014-09-02 10:20:50 -07:00
reed
1cbc68f965
Revert of Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/532583002/ )
...
Reason for revert:
linux_blink_rel
[ RUN ] DeferredImageDecoderTest.drawIntoSkPicture
../../third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp:172: Failure
Value of: canvasBitmap.getColor(0, 0)
Actual: 0
Expected: static_cast<SkColor>( (static_cast<U8CPU>(255) << 24) | (static_cast<U8CPU>(255) << 16) | (static_cast<U8CPU>(255) << 8) | (static_cast<U8CPU>(255) << 0))
Which is: 4294967295
[ FAILED ] DeferredImageDecoderTest.drawIntoSkPicture (0 ms)
[1457/1458] DeferredImageDecoderTest.drawIntoSkPicture (0 ms)
[ RUN ] DeferredImageDecoderTest.decodeOnOtherThread
../../third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp:233: Failure
Value of: canvasBitmap.getColor(0, 0)
Actual: 0
Expected: static_cast<SkColor>( (static_cast<U8CPU>(255) << 24) | (static_cast<U8CPU>(255) << 16) | (static_cast<U8CPU>(255) << 8) | (static_cast<U8CPU>(255) << 0))
Which is: 4294967295
[ FAILED ] DeferredImageDecoderTest.decodeOnOtherThread (1 ms)
[1458/1458] DeferredImageDecoderTest.decodeOnOtherThread (1 ms)
Retrying 2 tests (retry #2 )
Original issue's description:
> Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/525113005/ )
>
> Reason for revert:
> Experiment to see resulting failures
>
> Original issue's description:
> > Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/ )
> >
> > Reason for revert:
> > seems to be breaking layout tests in roll
> >
> > Original issue's description:
> > > Add gamma/sRGB tag to SkImageInfo
> > >
> > > This reverts commit 64ba5fa1ff
.
> > >
> > > BUG=skia:
> > >
> > > Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb
> >
> > TBR=reed@google.com
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/b44c1895afae516cb851cd1a0cea83343c354ee4
>
> TBR=reed@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4581828014eb3d015e6ed55c9a5b6932b8751818
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/524593005
2014-09-02 04:14:37 -07:00
reed
4581828014
Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/525113005/ )
...
Reason for revert:
Experiment to see resulting failures
Original issue's description:
> Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/ )
>
> Reason for revert:
> seems to be breaking layout tests in roll
>
> Original issue's description:
> > Add gamma/sRGB tag to SkImageInfo
> >
> > This reverts commit 64ba5fa1ff
.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb
>
> TBR=reed@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b44c1895afae516cb851cd1a0cea83343c354ee4
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/532583002
2014-09-01 18:36:24 -07:00
reed
b44c1895af
Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/ )
...
Reason for revert:
seems to be breaking layout tests in roll
Original issue's description:
> Add gamma/sRGB tag to SkImageInfo
>
> This reverts commit 64ba5fa1ff
.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/525113005
2014-09-01 14:28:32 -07:00
reed
c89aa509d6
Add gamma/sRGB tag to SkImageInfo
...
This reverts commit 64ba5fa1ff
.
BUG=skia:
R=reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/522813002
2014-09-01 12:14:29 -07:00
robertphillips
a8d7f0b13c
Try out scalar picture sizes
...
This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.
R=reed@google.com , mtklein@google.com , fmalita@google.com , fmalita@chromium.org
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/513983002
2014-08-29 08:03:56 -07:00
reed
64ba5fa1ff
Revert of Add gamma/sRGB tags to SkImageInfo (patchset #1 of https://codereview.chromium.org/517123002/ )
...
Reason for revert:
Seems to be triggering assert in blink
SSLUITest.TestRedirectHTTPToBadHTTPS (run #1 ):
[ RUN ] SSLUITest.TestRedirectHTTPToBadHTTPS
HTTP server started on http://127.0.0.1:58000 ...
sending server_data: {"host": "127.0.0.1", "port": 58000} (36 bytes)
HTTPS server started on https://127.0.0.1:58009 ...
sending server_data: {"host": "127.0.0.1", "port": 58009} (36 bytes)
ASSERTION FAILED: info.fAlphaType == m_imageInfo.fAlphaType
../../third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp(78) : virtual bool blink::DecodingImageGenerator::onGetPixels(const SkImageInfo &, void *, size_t, SkPMColor *, int *)
1 0x77eb0d3 blink::DecodingImageGenerator::onGetPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*)
2 0x92edddc SkImageGenerator::getPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*)
3 0x92adf78 SkDiscardablePixelRef::onNewLockPixels(SkPixelRef::LockRec*)
4 0x9369283 SkPixelRef::lockPixels(SkPixelRef::LockRec*)
5 0x9369433 SkPixelRef::lockPixels()
6 0x9213344 SkBitmap::lockPixels() const
7 0x921ca57 SkAutoLockPixels::SkAutoLockPixels(SkBitmap const&, bool)
8 0x921ad80 SkAutoLockPixels::SkAutoLockPixels(SkBitmap const&, bool)
9 0x92b7125 SkDraw::drawBitmap(SkBitmap const&, SkMatrix const&, SkPaint const&) const
10 0x921f4fb SkBitmapDevice::drawBitmap(SkDraw const&, SkBitmap const&, SkMatrix const&, SkPaint const&)
11 0x921f8c7 SkBitmapDevice::drawBitmapRect(SkDraw const&, SkBitmap const&, SkRect const*, SkRect const&, SkPaint const&, SkCanvas::DrawBitmapRectFlags)
12 0x9288e12 SkCanvas::internalDrawBitmapRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags)
13 0x9288ee9 SkCanvas::drawBitmapRectToRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags)
Original issue's description:
> Add gamma/sRGB tags to SkImageInfo
>
> requires this CL to land in chrome
> https://codereview.chromium.org/517803002/
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/228b285ba14a6e9b6d1cc95ea1583caab30168a1
R=fmalita@google.com , fmalita@chromium.org , reed@chromium.org
TBR=fmalita@chromium.org , fmalita@google.com , reed@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/519583004
2014-08-29 07:50:28 -07:00
reed
228b285ba1
Add gamma/sRGB tags to SkImageInfo
...
requires this CL to land in chrome
https://codereview.chromium.org/517803002/
BUG=skia:
R=fmalita@google.com , fmalita@chromium.org , reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/517123002
2014-08-29 04:08:43 -07:00
reed
088f4b8eb3
Revert of Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of https://codereview.chromium.org/511363002/ )
...
Reason for revert:
android builder in chrome reveals the caller using { } initialization for SkImageInfo, which this CL now makes illegal. Will have to fix the call site before I can re-land this
Original issue's description:
> Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of https://codereview.chromium.org/512243002/ )
>
> Reason for revert:
> this revert was premature -- the chrome canary I looked at is old, and newer ones were green. So trying again...
>
> Original issue's description:
> > Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/ )
> >
> > Reason for revert:
> > breaks linker on chrome -- may need SK_API, but not sure.
> >
> > Original issue's description:
> > > add gamma/sRGB to SkImageInfo
> > >
> > > BUG=skia:
> > >
> > > Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485
> >
> > TBR=bungeman@google.com ,bsalomon@google.com
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/dc53701216c0e9f98eacf6c0cda769ebbd200b59
>
> TBR=bungeman@google.com ,bsalomon@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e759a2662273fdf52ebbb3822229945eda317e46
R=bungeman@google.com , bsalomon@google.com
TBR=bsalomon@google.com , bungeman@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/517113002
2014-08-28 14:46:19 -07:00
reed
0b4abb904e
Revert of add SK_API to SkImageInfo (patchset #1 of https://codereview.chromium.org/513333003/ )
...
Reason for revert:
need to revert the big ImageInfo CL but since this was landed on top of it, I need to revert this guy first.
Original issue's description:
> add SK_API to SkImageInfo
>
> BUG=skia:
> TBR=bungeman
> NOTRY=True
>
> Committed: https://skia.googlesource.com/skia/+/bedec8456ff0ea814ed1bba748a86678f458d063
TBR=
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/518543002
2014-08-28 14:44:23 -07:00
fmalita
aa1b912046
Expose drawTextBlob to devices.
...
Instead of unrolling blobs in SkCanvas, perform the equivalent ops in
SkBaseDevice.
This depends on https://codereview.chromium.org/511783005/ .
R=jvanverth@google.com , reed@google.com , robertphillips@google.com , bsalomon@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/517663003
2014-08-28 14:32:24 -07:00
mtklein
0209e95cc2
Align all SkRecord::alloc() calls up to at least a pointer size.
...
This should make the LSAN bots able to see all our pointers.
BUG=skia:
R=reed@google.com , robertphillips@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/517073002
2014-08-28 14:10:05 -07:00
fmalita
228a6f275d
SkTextBlob GPipe serialization.
...
Instead of relying on unrolling blobs in SkCanvas, serialize when
passing through a GPipe.
This is a prerequisite for pushing the blob draw op to the device.
R=mtklein@google.com , reed@google.com , robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/511783005
2014-08-28 13:59:42 -07:00
reed
bedec8456f
add SK_API to SkImageInfo
...
BUG=skia:
TBR=bungeman
NOTRY=True
Author: reed@google.com
Review URL: https://codereview.chromium.org/513333003
2014-08-28 13:37:52 -07:00
reed
011f39aeb2
rename ScaledImageCache to ResourceCache
...
BUG=skia:
R=bsalomon@google.com , mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/511283002
2014-08-28 13:35:23 -07:00
reed
e759a26622
Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of https://codereview.chromium.org/512243002/ )
...
Reason for revert:
this revert was premature -- the chrome canary I looked at is old, and newer ones were green. So trying again...
Original issue's description:
> Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/ )
>
> Reason for revert:
> breaks linker on chrome -- may need SK_API, but not sure.
>
> Original issue's description:
> > add gamma/sRGB to SkImageInfo
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485
>
> TBR=bungeman@google.com ,bsalomon@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/dc53701216c0e9f98eacf6c0cda769ebbd200b59
R=bungeman@google.com , bsalomon@google.com
TBR=bsalomon@google.com , bungeman@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/511363002
2014-08-28 11:57:34 -07:00
reed
dc53701216
Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/ )
...
Reason for revert:
breaks linker on chrome -- may need SK_API, but not sure.
Original issue's description:
> add gamma/sRGB to SkImageInfo
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485
R=bungeman@google.com , bsalomon@google.com
TBR=bsalomon@google.com , bungeman@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/512243002
2014-08-28 06:53:19 -07:00
reed
615c369777
add gamma/sRGB to SkImageInfo
...
BUG=skia:
R=bungeman@google.com , bsalomon@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/514753002
2014-08-28 05:56:37 -07:00
robertphillips
d62833079f
Switch GPU Optimization code to SkRecord
...
R=mtklein@google.com , bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/504393002
2014-08-27 11:53:28 -07:00
mtklein
533eb782ed
Convert BBH APIs to use SkRect.
...
Still TODO: convert internals of SkTileGrid.cpp and SkRTree.cpp to work in floats too.
NOTREECHECKS=true
BUG=skia:1021
R=robertphillips@google.com , reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/511613002
2014-08-27 10:39:42 -07:00
mtklein
2a65a238b0
Remove SkQuadTree.
...
We're not testing it to the same degree we do RTree and TileGrid. Any changes
we'll make to BBH APIs become 33% easier without it. If find we want it again,
we can always resurrect it.
BUG=skia:1021,skia:2834
R=robertphillips@google.com , mtklein@google.com
TBR=reed
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/500373005
2014-08-26 14:07:04 -07:00
senorblanco
8a914a7650
Remove SkImageFilter::Set/GetExternalCache.
...
These were removed from the .cpp in
be129b26f1
, but I forgot to remove them
from the header.
R=bsalomon@google.com , reed@google.com
BUG=skia:
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/492693003
2014-08-26 14:06:01 -07:00
senorblanco
5e5f948b6b
Reimplement deserialization of SkImageFilter's uniqueID.
...
9fa60d ("Simplify flattening to just write enough ... ") simplified just
a tad too much. In particular, it disabled deserialization of
SkImageFilter's uniqueID, which in turn caused the failure of
SkImageFilter's cache, which caused a large regression in Chrome's SVG
filter performance.
The medium-term fix is to switch to the new SkRecordDraw SkPicture
backend, which will make the unique IDs unnecessary.
This change is an "in case of emergecy" CL, in the event that there are
problems switching on the new backend in Chrome. For that reason, it's
minimalist: only the filters used by Chrome are modified, and whitespace
changes are kept to a minimum. In this way, it should be easy to revert
once the new backend goes in.
R=reed@google.com
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/503833002
2014-08-26 12:27:12 -07:00
reed
99ae881a7f
remove (unused) scale parameter from measureText
...
BUG=skia:
R=bungeman@google.com , djsollen@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/510433002
2014-08-26 11:30:01 -07:00
halcanary
1790e25e18
SkAutoTDelete::operator T*()
...
R=reed@google.com , bungeman@google.com , mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/506963002
2014-08-26 11:06:25 -07:00
fmalita
b7425173f9
SkTextBlob plumbing
...
Add SkTextBlob serialization + drawTextBlob() overrides.
R=mtklein@google.com , reed@google.com , robertphillips@google.com
BUG=269080
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/499413002
2014-08-26 07:56:44 -07:00
bungeman
a6785ccb54
Add a working SkFontMgr_fontconfig.
...
R=tomhudson@google.com , reed@google.com , mtklein@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/396143004
2014-08-25 12:00:49 -07:00
mtklein
bc97ef4271
Document return value of SkPaint::operator==.
...
BUG=skia:1491
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/467063003
2014-08-25 10:10:47 -07:00
jbroman
3053dfaefd
Add SK_API to SkTextBlob and SkTextBlobBuilder.
...
BUG=skia:2868
R=fmalita@chromium.org , reed@google.com
Author: jbroman@chromium.org
Review URL: https://codereview.chromium.org/497993002
2014-08-25 06:22:12 -07:00
halcanary
a5c0863d98
remove SkPurgeGlobalDiscardableMemoryPool
...
BUG=skia:2721
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/495453004
2014-08-25 06:20:13 -07:00
fmalita
37ecbaffd1
[SkTextBlob] Merge run font data at draw time.
...
R=bungeman@google.com , reed@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/496773002
2014-08-22 09:01:20 -07:00
reed
8367b8cb7a
extend SkShader to report a luminance-color to be used for gamma correction
...
BUG=skia:590
R=bungeman@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/492963002
2014-08-22 08:30:20 -07:00
joshualitt
30ba436f04
Initial refactor of shaderbuilder to prepare for geometry shaders
...
gitignore for eclipse
BUG=skia:
R=bsalomon@google.com , bsalomon@chromium.org
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/491673002
2014-08-21 20:18:45 -07:00
fmalita
c6765d69e3
Add some SkTextBlob builder tests.
...
R=reed@google.com , robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/493443004
2014-08-21 15:03:04 -07:00
robertphillips
7eacd77ce6
SkMultiPictureDraw API
...
This CL adds a new API to optimize across multiple SkPicture draw calls.
Note that multiple pictures rendered at once (i.e., picture piles) should be flattened into a single new picture that includes the required clipping on the different layers.
R=bsalomon@google.com , reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/491313003
2014-08-21 13:12:42 -07:00
mtklein
c92e550d36
Install a hook to swap between SkPicture backends with a single define.
...
BUG=skia:
R=robertphillips@google.com , reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/492023002
2014-08-21 13:07:27 -07:00
mtklein
53fecfb15d
Our SkPicture::Analysis visitors should recurse into nested pictures.
...
BUG=skia:
R=tomhudson@google.com , mtklein@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/495793002
2014-08-21 09:11:38 -07:00
fmalita
00d5c2c652
SkTextBlob
...
Initial implementation.
R=bungeman@google.com , jbroman@chromium.org , mtklein@google.com , reed@google.com , robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/473633002
2014-08-21 08:53:26 -07:00
reed
9fa60daad4
Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).
...
Refactoring pattern:
1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).
If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.
R=robertphillips@google.com , mtklein@google.com , senorblanco@google.com , senorblanco@chromium.org , sugoi@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/395603002
2014-08-21 07:59:51 -07:00
halcanary
af28dc6030
Make SkPMColorAssert a macro (all assert-like functions should be macros).
...
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/494863003
2014-08-21 06:30:11 -07:00
reed
8bf3df68c5
remove code for (dead) SK_SUPPORT_LEGACY_GETCLIPTYPE
...
BUG=skia:
R=djsollen@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/489103003
2014-08-21 05:51:22 -07:00
mtklein
7b705bb17e
Always read .skp files and other serialized pictures into SkRecord.
...
This should switch all our internal tools that aren't clever about it over to SkRecord pictures. (The clever tools know what they're doing.)
Also, deletes the old SkPicture::clone() path. return this or die.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/481743003
2014-08-20 14:22:58 -07:00
mtklein
c551d9fcae
Implement SkPicture::hasText() for SkRecord backend.
...
Plus, some small tweaks to the existing code surrounding it. Just proposals,
will undo whatever you don't like.
BUG=skia:
R=mtklein@google.com , tomhudson@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/494683003
2014-08-20 08:09:46 -07:00
tomhudson
3a0f279167
Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702 .
...
Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test.
BUG=skia:2700
R=mtklein@google.com , reed@google.com , robertphillips@google.com , tomhudson@google.com
Committed: https://skia.googlesource.com/skia/+/60c2a79cfa8ceebcbafc243407564dc71f5e3b4f
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/364823009
2014-08-20 05:29:41 -07:00
piotaixr
d2a3522503
Add the method isOpaque() to SkImage
...
BUG=skia:2766
R=junov@chromium.org , halcanary@google.com , scroggo@google.com , reed@google.com , bsalomon@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/406673003
2014-08-19 14:29:02 -07:00
bungeman
31c4772b78
Treat embedded bitmaps as a hinting method.
...
R=reed@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/483313002
2014-08-19 13:18:58 -07:00
caryclark
38dd9f2e41
remove unused SkIntToFloatCast_NoOverflowCheck
...
R=reed@google.com , reed
BUG=skia:2849
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/483273003
2014-08-19 07:39:41 -07:00
halcanary
97d2c0a216
Move SkReadBuffer.h and SkReader32.h out of include.
...
Committed: https://skia.googlesource.com/skia/+/2a51d7c74cec217195f861677de8998b382b39e4
R=mtklein@google.com , reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/481053002
2014-08-19 06:27:53 -07:00
Mike Klein
27dc17c297
Revert "Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702 ."
...
This reverts commit 60c2a79cfa
.
BUG=skia:
Review URL: https://codereview.chromium.org/481173003
2014-08-18 18:35:16 -04:00
tomhudson
60c2a79cfa
Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702 .
...
Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test.
BUG=skia:2700
R=mtklein@google.com , reed@google.com , robertphillips@google.com , tomhudson@google.com
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/364823009
2014-08-18 15:07:13 -07:00
halcanary
f128f53a5b
Revert "Move SkReadBuffer.h and SkReader32.h out of include."
...
This reverts commit 2a51d7c74c
.
Breaking Blink
NOTRY=true
R=bungeman@google.com
TBR=bungeman@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/472303006
2014-08-18 13:48:13 -07:00
halcanary
2a51d7c74c
Move SkReadBuffer.h and SkReader32.h out of include.
...
R=mtklein@google.com , reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/481053002
2014-08-18 13:04:59 -07:00
ajuma
750ae26745
Expose API for whether an SkPicture contains text
...
BUG=chromium:399728
R=reed@google.com , nduca@chromium.org
Author: ajuma@chromium.org
Review URL: https://codereview.chromium.org/478673002
2014-08-18 12:59:55 -07:00
halcanary
ea4673fde6
SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
...
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/465823003
2014-08-18 08:27:09 -07:00
reed
bbe7a2ad32
eliminate code related to SkBitmap::Config
...
BUG=skia:
R=reed@google.com , mike@reedtribe.org
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/483593002
2014-08-18 08:13:03 -07:00
mtklein
5a246bb487
int SkPicture::approximateOpCount()
...
NOTREECHECKS=true
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/470333002
2014-08-14 19:17:21 -07:00
djsollen
3b6255493e
Remove SkPaintOptionsAndroid
...
Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b
R=reed@google.com , mtklein@google.com , tomhudson@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/447873003
2014-08-14 06:29:03 -07:00
bsalomon
c15e28a522
Revert of Remove SkPaintOptionsAndroid (patchset #5 of https://codereview.chromium.org/447873003/ )
...
Reason for revert:
Breaks the Chromium build: http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2469/steps/BuildContentShell_1/logs/stdio
Original issue's description:
> Remove SkPaintOptionsAndroid
>
> Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b
R=reed@google.com , mtklein@google.com , tomhudson@google.com , djsollen@google.com
TBR=djsollen@google.com , mtklein@google.com , reed@google.com , tomhudson@google.com
NOTREECHECKS=true
NOTRY=true
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/473543004
2014-08-13 15:18:46 -07:00
mtklein
6cfa73a29a
Start tracking the CTM while filling the BBH in SkRecordDraw.
...
Depends on https://codereview.chromium.org/475473002/
BUG=skia:
R=robertphillips@google.com , reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/468193003
2014-08-13 13:33:49 -07:00
djsollen
f32331ffdb
Remove SkPaintOptionsAndroid
...
R=reed@google.com , mtklein@google.com , tomhudson@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/447873003
2014-08-13 13:09:49 -07:00
halcanary
78ee93f545
Revert of SkImage::NewFromGenerator(SkImageGenerator*), and a unit test. ( https://codereview.chromium.org/465823003/ )
...
Reason for revert:
Mac bots are failing
Original issue's description:
> SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
>
> Committed: https://skia.googlesource.com/skia/+/186f7b04956a1742f185a4ca69b44b52bc50e7fc
R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/453723003
2014-08-12 09:07:08 -07:00
dandov
b3c9d1c33c
SkCanvas::drawPatch param SkPoint[12]
...
drawPatch now receives as parameter const SkPoint cubics[12]
Adjusted derived classes and serialization.
Ajusted GM's and benches that take into account combinations of optional
parameters, the scale of the patch and 4 different types of patches.
Planning on adding the extra functionality of SkPatch in another CL.
BUG=skia:
R=egdaniel@google.com , reed@google.com
Author: dandov@google.com
Review URL: https://codereview.chromium.org/463493002
2014-08-12 08:34:29 -07:00
halcanary
186f7b0495
SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
...
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/465823003
2014-08-12 08:04:58 -07:00
reed
8572fc01ac
mark all SkImage methods const, so we can make it thread-safe
...
BUG=skia:
R=mtklein@google.com , halcanary@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/453613003
2014-08-11 13:03:56 -07:00
mtklein
5ad6ee1b2c
Plumbing for using a BBH in SkRecordDraw.
...
For now this only creates a degenerate bounding box hierarchy where all ops
just have maximal bounds. I will flesh out FillBounds in future CL(s).
Not quite sure why QuadTree and TileGrid aren't drawing right---haven't even
looked at the diffs yet---so I've disabled those test modes for now. RTree
seems fine, so that'll at least get us coverage for all this new plumbing.
BUG=skia:
R=robertphillips@google.com , mtklein@google.com , reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/454123003
2014-08-11 08:08:43 -07:00
reed
872e3dc89d
Revert of Revert of remove (now unneeded) legacy onDrawPicture variant ( https://codereview.chromium.org/457253002/ )
...
Reason for revert:
webkit has been updated, so re-landing
Original issue's description:
> Revert of remove (now unneeded) legacy onDrawPicture variant (https://codereview.chromium.org/456203002/ )
>
> Reason for revert:
> still need to update ProfilingCanvas in blink
>
> Original issue's description:
> > remove (now unneeded) legacy onDrawPicture variant
> >
> > TBR=fmalita@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/2e69d292e5a389db7d9264eb66172376692de8ca
>
> TBR=
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/47f9bdcc3d741a63935c52bfe85db44ab13f66f2
R=reed@chromium.org
TBR=reed@chromium.org
NOTREECHECKS=true
NOTRY=true
Author: reed@google.com
Review URL: https://codereview.chromium.org/460693002
2014-08-11 06:35:48 -07:00
reed
47f9bdcc3d
Revert of remove (now unneeded) legacy onDrawPicture variant ( https://codereview.chromium.org/456203002/ )
...
Reason for revert:
still need to update ProfilingCanvas in blink
Original issue's description:
> remove (now unneeded) legacy onDrawPicture variant
>
> TBR=fmalita@google.com
>
> Committed: https://skia.googlesource.com/skia/+/2e69d292e5a389db7d9264eb66172376692de8ca
TBR=
NOTREECHECKS=true
NOTRY=true
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/457253002
2014-08-10 19:04:01 -07:00
reed
2e69d292e5
remove (now unneeded) legacy onDrawPicture variant
...
TBR=fmalita@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/456203002
2014-08-10 11:28:46 -07:00
reed
d5fa1a455a
add drawPicture variant that takes a matrix and paint
...
will need some staging strategy, since chrome and blink have overrides of onDrawPicture
R=robertphillips@google.com , fmalita@google.com , bsalomon@google.com , mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/448793004
2014-08-09 11:08:05 -07:00
reed
3b1c3d2c61
add dummy onDrawPicture to allow migration for chrome overrides
...
after this lands in chrome, land these two CLs
https://codereview.chromium.org/454993002/
https://codereview.chromium.org/454143003
then land this skia CL
https://codereview.chromium.org/448793004/
then remove the onDrawPicture overrides from chrome
R=fmalita@google.com , robertphillips@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/457753002
2014-08-08 12:51:24 -07:00
senorblanco
be129b26f1
Remove external SkImageFilter cache, and rename UniqueIDCache -> Cache.
...
There Can Only Be One.... Cache for SkImageFilter.
R=bsalomon@google.com
BUG=skia:
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/452923002
2014-08-08 07:14:35 -07:00
bsalomon
6eb03cc06d
Add option to dump images from nanobench.
...
Add option to set the repeat count to any number, replacs the --runOnce flag.
R=mtklein@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/450743002
2014-08-07 14:28:50 -07:00
krajcevski
95b1b3d82d
Add astcbitmap to gm slides.
...
Add additional ASTC formats.
Add astc image decoder files.
R=reed@google.com , robertphillips@google.com , halcanary@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/444093002
2014-08-07 12:58:38 -07:00
krajcevski
7b62448065
Revert of - Add astcbitmap to gm slides ( https://codereview.chromium.org/444093002/ )
...
Reason for revert:
Breaking DM
Original issue's description:
> - Add astcbitmap to gm slides
> - Add additional ASTC formats
> - Add astc image decoder files
>
> Committed: https://skia.googlesource.com/skia/+/2fc05823fed4b9649338f3029cd1ba05ef49a02f
R=reed@google.com , robertphillips@google.com , halcanary@google.com
TBR=halcanary@google.com , reed@google.com , robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/447343002
2014-08-07 11:33:59 -07:00
krajcevski
2fc05823fe
- Add astcbitmap to gm slides
...
- Add additional ASTC formats
- Add astc image decoder files
R=reed@google.com , robertphillips@google.com , halcanary@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/444093002
2014-08-07 11:18:09 -07:00
dandov
963137b75c
Stopped skipping tests in dm of SkPatch by implementing the
...
corresponding drawPath calls on classes that derive from SkCanvas.
BUG=skia:
R=egdaniel@google.com , bsalomon@google.com , mtklein@google.com , robertphillips@google.com
Author: dandov@google.com
Review URL: https://codereview.chromium.org/429343004
2014-08-07 07:49:53 -07:00