reed@google.com
76f10a3bd9
remove SkCanvas::createCompatibleDevice, and add SkCanvas::newSurface
...
BUG=skia:
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/154163002
git-svn-id: http://skia.googlecode.com/svn/trunk@13319 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-05 15:32:21 +00:00
skia.committer@gmail.com
1dab403e44
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13316 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-05 03:01:48 +00:00
commit-bot@chromium.org
967dee32ef
Make SkFontMgr interface const.
...
COLLABORATOR=mtklein@chromium.org
BUG=skia:
R=reed@google.com , bungeman@google.com , mtklein@chromium.org
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/134643028
git-svn-id: http://skia.googlecode.com/svn/trunk@13314 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 22:35:01 +00:00
commit-bot@chromium.org
ea6e14a382
TSAN: use somewhat pithier SK_ANNOTATE_UNPROTECTED_READ.
...
This is a little bit better practice to be i than the existing SK_ANNOTATE_BENIGN_RACE, as UNPROTECTED_READ will only ignore reads, not writes.
Tag SkRefCnt::unique() as a safe unprotected read like SkOnce's double-checked locking.
BUG=skia:
R=reed@google.com , bungeman@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/144953005
git-svn-id: http://skia.googlecode.com/svn/trunk@13309 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 18:00:23 +00:00
reed@google.com
fdbd504950
remove kGL_Capability (unused)
...
BUG=skia:
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/153993003
git-svn-id: http://skia.googlecode.com/svn/trunk@13307 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 17:49:52 +00:00
reed@google.com
6fcd28ba1d
fix samplefuzz, fix some 32/64bit warnings
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13303 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 16:03:51 +00:00
reed@google.com
28183b4043
remove (unused by chrome) SkDeferredCanvas(device) factory signature
...
BUG=skia:
R=junov@chromium.org
Review URL: https://codereview.chromium.org/136753016
git-svn-id: http://skia.googlecode.com/svn/trunk@13302 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 15:34:10 +00:00
reed@google.com
372b7a4f56
remove redundant GrContext parameter to NewRenderTargetDirect
...
BUG=skia:
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/151183003
git-svn-id: http://skia.googlecode.com/svn/trunk@13299 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 14:58:30 +00:00
commit-bot@chromium.org
2859f9fbf3
rename tracing parameter to be more consistent with other methods
...
BUG=skia:
R=bsalomon@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/136753013
git-svn-id: http://skia.googlecode.com/svn/trunk@13287 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-03 19:47:13 +00:00
commit-bot@chromium.org
3458a1736f
clean up a couple of parameters in the tracing interface
...
BUG=skia:
R=bsalomon@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/145973011
git-svn-id: http://skia.googlecode.com/svn/trunk@13283 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-03 18:09:32 +00:00
commit-bot@chromium.org
e254310a55
add SkCanvas constructor that explicitly creates no_config with dimensions
...
BUG=skia:
R=scroggo@google.com , halcanary@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/137833016
git-svn-id: http://skia.googlecode.com/svn/trunk@13272 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 19:42:58 +00:00
commit-bot@chromium.org
bf6a6d4504
fix leaks in SkConf
...
These leaks were small and would only happen with non-default
runtime configuration things set, but they were still leaks
and they should be squished.
Valgrind reported leaks pre-patch, and all the rtconf leaks are gone after patch.
BUG=skia:1722
R=reed@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/136963004
git-svn-id: http://skia.googlecode.com/svn/trunk@13269 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 17:32:03 +00:00
commit-bot@chromium.org
c6d3c444ca
Have peek32 return uint32_t& to make it harder to look at more than 4 bytes.
...
BUG=skia:
R=reed@google.com , robertphillips@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/145053003
git-svn-id: http://skia.googlecode.com/svn/trunk@13265 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 16:22:57 +00:00
skia.committer@gmail.com
4c18e9fbb6
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13258 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 03:01:59 +00:00
commit-bot@chromium.org
cc787fa802
fix auto-delete bug that crept in with new fast blur path; is causing
...
some of the valgrind errors.
BUG=skia:2111
R=bsalomon@google.com , robertphillips@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/148593003
git-svn-id: http://skia.googlecode.com/svn/trunk@13257 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 01:00:49 +00:00
commit-bot@chromium.org
6169f2b4da
initial import of Chrome's trace_event into skia framework
...
This patch includes a modified version of Chrome's trace_event.h, which provides
tracing macros that can easily integrate into the about://tracing framework.
Currently the macros link to a default implementation of the (narrow) tracing
class SkDefaultEventTracer which does nothing; next step will be to have Chrome
subclass the SkEventTracer with a shim that bolts Skia's trace events to its own,
allowing Skia's trace events to show up in about://tracing.
I've verified that this file builds properly, and when I added a simple scoped
TRACE_EVENT0 to SkCanvas::drawRect, along with some debug prints in the NOP
implementation of tracing, I saw what I expected printed to the screen.
BUG=skia:
R=nduca@chromium.org , reed@google.com , mtklein@google.com , bsalomon@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/149563004
git-svn-id: http://skia.googlecode.com/svn/trunk@13256 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-31 00:04:25 +00:00
commit-bot@chromium.org
a2bd2d12ad
Set write buffer flags only in SkWriteBuffer and SkFlatController constructors.
...
This is a baby step toward refactored (and faster in-process) typeface and flattenable factory encoding and decoding. The sooner SkWriteBuffer knows its flags, the better.
Next steps will be to rearrange Sk{Read,Write}Buffer members into disjoint strategies to handle typefaces and flattenable factories: one for in-process, one for cross-process, one when validating.
BUG=skia:
R=reed@google.com , scroggo@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/138803005
git-svn-id: http://skia.googlecode.com/svn/trunk@13253 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 22:16:32 +00:00
commit-bot@chromium.org
cbbc481e91
Replace factory generation of TextContexts with persistent objects.
...
BUG=skia:2018
R=bsalomon@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/150743002
git-svn-id: http://skia.googlecode.com/svn/trunk@13249 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 22:05:47 +00:00
commit-bot@chromium.org
8b0e8ac5f5
Refactor read and write buffers.
...
Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer
a step each in the hierarchy.
What used to be this:
SkFlattenableWriteBuffer -> SkOrderedWriteBuffer
SkFlattenableReadBuffer -> SkOrderedReadBuffer
SkFlattenableReadBuffer -> SkValidatingReadBuffer
is now
SkWriteBuffer
SkReadBuffer -> SkValidatingReadBuffer
Benefits:
- code is simpler, names are less wordy
- the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed
- write buffers are completely devirtualized, important for record speed
This refactoring was mostly mechanical. You aren't going to find anything
interesting in files with less than 10 lines changed.
BUG=skia:
R=reed@google.com , scroggo@google.com , djsollen@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/134163010
git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 18:58:24 +00:00
commit-bot@chromium.org
ddf2bfb190
Move GrTextContext to private interface
...
NOTRY=true
R=bsalomon@google.com , reed@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/145073005
git-svn-id: http://skia.googlecode.com/svn/trunk@13239 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 16:41:23 +00:00
commit-bot@chromium.org
cf34bc0634
patch from issue 119343003
...
compile on 10.6, exclude failing gms
Sorry for making another CL; rebasing ToT on the old one ended up with code in a tangled mess; was easier to start over.
NOTRY=true
R=bsalomon@google.com , epoger@google.com , reed@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/148883005
git-svn-id: http://skia.googlecode.com/svn/trunk@13238 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 15:34:43 +00:00
commit-bot@chromium.org
9f94b9104a
Add fallback code for TextContexts that don't support all features
...
BUG=skia:2018
NOTRY=true
R=bsalomon@google.com , reed@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/135683006
git-svn-id: http://skia.googlecode.com/svn/trunk@13236 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 15:22:54 +00:00
skia.committer@gmail.com
e5d7015cde
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13228 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-29 07:01:48 +00:00
commit-bot@chromium.org
e8612d9a8d
Add standalone drawText for GrTextContext.
...
This unifies the interface between GrBitmapTextContext and
GrDistanceFieldTextContext so that they don't need special case code.
The future GrNVPRTextContext will also use this interface.
BUG=skia:2018
R=bsalomon@google.com , reed@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/141863005
git-svn-id: http://skia.googlecode.com/svn/trunk@13227 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-28 22:02:07 +00:00
reed@google.com
c1587f94a7
change setAlphaType to not modify the pixelref's genID
...
BUG=skia:
R=bsalomon@google.com , halcanary@google.com
Review URL: https://codereview.chromium.org/137263009
git-svn-id: http://skia.googlecode.com/svn/trunk@13219 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-28 16:05:39 +00:00
commit-bot@chromium.org
dcfa9ff57c
Revert of Fast blurred rectangles on GPU ( https://codereview.chromium.org/119343003/ )
...
Reason for revert:
Two problems:
1. broke compile on Build-Mac10.6-* bots
2. broke GM expectations on many bots
We'll need to examine the GM impact before re-landing. I can work with you to do this on Tuesday if you like; just IM or email me.
Original issue's description:
> Perform the same analytic blur calculation on the GPU that we do on the CPU. Results in significant performance gains when using Ganesh to render drop shadows in Chrome.
>
> BUG=
>
> Committed: http://code.google.com/p/skia/source/detail?r=13210
R=bsalomon@google.com , reed@google.com , humper@google.com , rmistry@google.com
TBR=bsalomon@google.com , humper@google.com , reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=
Author: epoger@google.com
Review URL: https://codereview.chromium.org/140853008
git-svn-id: http://skia.googlecode.com/svn/trunk@13213 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-28 01:55:24 +00:00
commit-bot@chromium.org
d1829151a5
Perform the same analytic blur calculation on the GPU that we do on the CPU. Results in significant performance gains when using Ganesh to render drop shadows in Chrome.
...
BUG=
R=bsalomon@google.com , reed@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/119343003
git-svn-id: http://skia.googlecode.com/svn/trunk@13210 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-27 22:41:45 +00:00
senorblanco@chromium.org
336d1d7595
Implement a computeFastBounds() traversal for SkImageFilter.
...
This allows for correct culling of primitives which have image filters applied.
R=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/137423005
git-svn-id: http://skia.googlecode.com/svn/trunk@13207 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-27 21:03:17 +00:00
reed@google.com
99f381ad76
move getAdvancedTypefaceMetrics into private, as only skia internals call it
...
BUG=skia:
R=bungeman@google.com , vandebo@chromium.org
Review URL: https://codereview.chromium.org/148583002
git-svn-id: http://skia.googlecode.com/svn/trunk@13206 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-27 21:02:14 +00:00
commit-bot@chromium.org
c8de7a311a
Ensure SSE2/3 is always enabled on Android.
...
R=mtklein@google.com , reed@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/132883008
git-svn-id: http://skia.googlecode.com/svn/trunk@13204 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-27 20:41:03 +00:00
commit-bot@chromium.org
0e8d0d6cdc
add optional SkAlphaType parameter to notifyPixelsChanged
...
R=scroggo@google.com , halcanary@google.com , robertphillips@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/147213002
git-svn-id: http://skia.googlecode.com/svn/trunk@13192 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-27 15:41:07 +00:00
reed@google.com
7fa2a65c0c
fix more 64bit warnings
...
BUG=skia:
Review URL: https://codereview.chromium.org/147683003
git-svn-id: http://skia.googlecode.com/svn/trunk@13190 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-27 13:42:58 +00:00
reed@google.com
1a5e51f94e
remove SkScalarMul from public headers
...
BUG=skia:
Review URL: https://codereview.chromium.org/132453008
git-svn-id: http://skia.googlecode.com/svn/trunk@13189 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-27 13:41:02 +00:00
tfarina@chromium.org
658650c5b4
Remove unused methods from SkWindow.
...
I came to this while grepping for deprecated SkBitmap's eraseRGB()
method.
BUG=None
TEST=SampleApp still links
R=reed@google.com , robertphillips@google.com
Review URL: https://codereview.chromium.org/147433002
git-svn-id: http://skia.googlecode.com/svn/trunk@13184 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-25 18:45:45 +00:00
commit-bot@chromium.org
c2abd54eda
add alternative to isRect named asRect
...
This defines yunchao's proposed interface in terms of
an existing implementation.
BUG=skia:
R=reed@google.com , yunchao.he@intel.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/140953003
git-svn-id: http://skia.googlecode.com/svn/trunk@13183 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-25 16:54:31 +00:00
reed@google.com
eb9a46cbbb
add legacy/helper allocN32Pixels, and convert gm to use it
...
This is an intermediate api, but might help us quickly get to a point where
no one is creating bitmaps in a 2-step process (setConfig + alloc).
BUG=skia:
R=halcanary@google.com
Review URL: https://codereview.chromium.org/140593005
git-svn-id: http://skia.googlecode.com/svn/trunk@13182 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-25 16:46:20 +00:00
skia.committer@gmail.com
d2ac07b64b
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13181 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-25 07:01:49 +00:00
commit-bot@chromium.org
709ca75f03
SkOnce: add option to call another cleanup function once at exit.
...
Use this to clean up empty SkData and SkPathRef.
Current leaks:
Leaked SkRefCntBase: 40
Leaked SkFlattenable: 32
Leaked SkPixelRef: 32
Leaked SkMallocPixelRef: 32
Leaked SkFontConfigInterface: 1
Leaked SkWeakRefCnt: 1
Leaked SkTypeface: 1
Leaked SkFontMgr: 1
Leaked SkDataTable: 3
Leaked SkImage: 1
Leaked ???: 1
Leaked ???: 1
BUG=skia:
R=halcanary@google.com , reed@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/132803005
git-svn-id: http://skia.googlecode.com/svn/trunk@13180 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 22:38:39 +00:00
commit-bot@chromium.org
a8c7f7702f
fix (some) 64bit warnings -- size_t -> int
...
BUG=skia:
R=mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/147053003
git-svn-id: http://skia.googlecode.com/svn/trunk@13178 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 21:46:29 +00:00
commit-bot@chromium.org
d8ed85101e
Turn NVPR on by default (but off in tools).
...
BUG=skia:2042
Committed: http://code.google.com/p/skia/source/detail?r=13164
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/144003006
git-svn-id: http://skia.googlecode.com/svn/trunk@13176 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 20:49:44 +00:00
reed@google.com
9ebcac5463
add installPixels
...
BUG=skia:
R=halcanary@google.com
Review URL: https://codereview.chromium.org/143073008
git-svn-id: http://skia.googlecode.com/svn/trunk@13174 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 18:53:42 +00:00
commit-bot@chromium.org
227c246731
Resolve a few memory leaks in tests.
...
Purge the global scaled image cache after use in tests. The cache was
right to hold on to the pixels indefinitely, but this change makes it
easier to run down actual memory leaks.
Add SK_DECLARE_INST_COUNT to several classes.
BUG=skia:
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/145443004
git-svn-id: http://skia.googlecode.com/svn/trunk@13171 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 18:33:07 +00:00
halcanary@google.com
68c74884d0
Revert "Turn NVPR on by default (but off in tools)."
...
This reverts commit 83d81c96de
.
Broke Windows build. Autorevert didn't work.
TBR=bsalomon@google.com ,robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true
BUG=skia:2042
Review URL: https://codereview.chromium.org/146863003
git-svn-id: http://skia.googlecode.com/svn/trunk@13169 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 16:04:09 +00:00
senorblanco@chromium.org
0ded88d431
[Reland of r13154, since the Housekeeping bot seems to have reverted it in r13155. Next time I'll put the "do not disturb" sign on my commit.]
...
Refactor SkMorphologyImageFilter, CPU and GPU paths. This required making opts/ dependent on effects/, so that we could use the SkMorphologyProc type in SkMorphologyImageFilter.h.
Correctness and performance covered by existing tests; no change in functionality.
R=bsalomon@google.com , djsollen@google.com , reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=13154
BUG=skia:
Review URL: https://codereview.chromium.org/135013004
git-svn-id: http://skia.googlecode.com/svn/trunk@13168 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 15:43:50 +00:00
commit-bot@chromium.org
cc40f06db7
Add factory class for generating various flavors of GrTextContext.
...
This is the first pass of making Gr*TextContext more generic and easily
subclassed. The next stage will be making GrBitmapTextContext and
GrDistanceFieldTextContext more similar by moving the SkDraw loop into
each subclass.
BUG=skia:2018
Committed: http://code.google.com/p/skia/source/detail?r=13142
R=bsalomon@google.com , reed@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/144283002
git-svn-id: http://skia.googlecode.com/svn/trunk@13165 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 14:38:27 +00:00
commit-bot@chromium.org
83d81c96de
Turn NVPR on by default (but off in tools).
...
BUG=skia:2042
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/144003006
git-svn-id: http://skia.googlecode.com/svn/trunk@13164 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 14:38:13 +00:00
skia.committer@gmail.com
1878a44c74
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13155 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-23 18:48:56 +00:00
senorblanco@chromium.org
76d4d04b18
Refactor SkMorphologyImageFilter, CPU and GPU paths. This required making opts/ dependent on effects/, so that we could use the SkMorphologyProc type in SkMorphologyImageFilter.h.
...
Correctness and performance covered by existing tests; no change in functionality.
R=bsalomon@google.com , djsollen@google.com , reed@google.com
Review URL: https://codereview.chromium.org/135013004
git-svn-id: http://skia.googlecode.com/svn/trunk@13154 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-23 18:45:23 +00:00
commit-bot@chromium.org
fed2ab6483
No deduping dictionaries for matrices and regions.
...
There's little benefit to deduping matrices and regions: they're infrequently
used, and doubly infrequently reused. Their use-weighted byte cost is tiny.
There is some downside to deduping matrices and regions. Even when they're not
used, we prepare dictionaries for deduping them for every picture. Each of
these dictionaries costs 160 bytes, so two unused dictionaries make a big chunk
of the ~1100 bytes it takes to allocate an SkPictureRecord. (~330 come from
parent class SkCanvas, 768 from SkPictureRecord itself, here reduced to 448).
One side benefit of not deduping these guys is that the change weighs -140 lines of code.
It may go without saying, but this breaks the picture format.
Testing: out/Debug/tests && out/Debug/dm (which runs all picture modes by default)
BUG=skia:1850
R=reed@google.com , bensong@google.com , robertphillips@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/143883006
git-svn-id: http://skia.googlecode.com/svn/trunk@13149 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-23 15:16:05 +00:00
mike@reedtribe.org
d173b87608
remove SkScalarMul macro
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13145 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-23 02:02:45 +00:00
commit-bot@chromium.org
f1d63aa80d
Revert of Add factory class for generating various flavors of GrTextContext. ( https://codereview.chromium.org/144283002/ )
...
Reason for revert:
Breaks Chrome. Need to fix template issue.
Original issue's description:
> Add factory class for generating various flavors of GrTextContext.
>
> This is the first pass of making Gr*TextContext more generic and easily
> subclassed. The next stage will be making GrBitmapTextContext and
> GrDistanceFieldTextContext more similar by moving the SkDraw loop into
> each subclass.
>
> BUG=skia:2018
>
> Committed: http://code.google.com/p/skia/source/detail?r=13142
R=bsalomon@google.com , reed@google.com
TBR=bsalomon@google.com , reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2018
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/145023006
git-svn-id: http://skia.googlecode.com/svn/trunk@13143 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-22 22:01:41 +00:00
commit-bot@chromium.org
ce96b651d3
Add factory class for generating various flavors of GrTextContext.
...
This is the first pass of making Gr*TextContext more generic and easily
subclassed. The next stage will be making GrBitmapTextContext and
GrDistanceFieldTextContext more similar by moving the SkDraw loop into
each subclass.
BUG=skia:2018
R=bsalomon@google.com , reed@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/144283002
git-svn-id: http://skia.googlecode.com/svn/trunk@13142 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-22 21:37:03 +00:00
commit-bot@chromium.org
c72425ae36
Move GrGLInterface function pointers into a nested struct
...
BUG=skia:2042
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/133073009
git-svn-id: http://skia.googlecode.com/svn/trunk@13130 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-21 16:09:18 +00:00
commit-bot@chromium.org
91506eb0b9
Scope our ANNOTATE_BENIGN_RACE.
...
This should unstick the DEPS roll. When building with TSAN, Chromium's pulling
in the canonical one from dynamic_annotations.h, and we're trying to redefine it.
R=robertphillips@google.com , reed@google.com , bsalomon@google.com
TBR=reed@google.com
BUG=
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/144063002
git-svn-id: http://skia.googlecode.com/svn/trunk@13129 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-21 15:11:02 +00:00
commit-bot@chromium.org
2ab1ba0555
Make leak counters thread-safe and turn them on by default for Debug
...
Make leak counters implemented with SK_DECLARE_INST_COUNT thread-safe.
Enable the leak counting for Debug builds when Skia is built as a
static library. Having SK_DECLARE_INST_COUNT without
SK_DEFINE_INST_COUNT relies on static variables in member functions
declared in the header files. These might be duplicated in the clients
of the library when Skia is built as a dynamic library, producing
incorrect operation.
Protect the instance counter initialization step (initStep) by
using SkOnce.
Makes SkOnce.h part of the public API, since SkInstCnt is public.
Protect the per-class child list shared variable with a per-class mutex.
Changes the behavior in the way that if the child list has been
"cleaned up", it will still try to create subsequent child lists.
BUG=skia:1219
R=robertphillips@google.com , mtklein@google.com , bsalomon@google.com , bungeman@google.com , djsollen@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/99483003
git-svn-id: http://skia.googlecode.com/svn/trunk@13120 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-17 17:55:02 +00:00
commit-bot@chromium.org
7322893af0
Adding SK_API to SkGLContextHelper and SkNullGLContext for use in blink unit test component build
...
BUG=skia:
R=bsalomon@chromium.org
Author: junov@chromium.org
Review URL: https://codereview.chromium.org/141813002
git-svn-id: http://skia.googlecode.com/svn/trunk@13119 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-17 16:59:03 +00:00
commit-bot@chromium.org
90313cc36a
Move GrGLExtensions from GrGLContextInfo to GrGLInterface
...
BUG=skia:2042
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/140823003
git-svn-id: http://skia.googlecode.com/svn/trunk@13118 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-17 15:05:38 +00:00
commit-bot@chromium.org
92b7884e88
Remove GR_GL_IGNORE_ES3_MSAA.s
...
R=jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/140933005
git-svn-id: http://skia.googlecode.com/svn/trunk@13115 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-16 20:49:46 +00:00
commit-bot@chromium.org
cc190eb6f3
Allow GrGLInterface factories in Chromium to continue to compile.
...
BUG=skia:2042
TBR=jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/136573003
git-svn-id: http://skia.googlecode.com/svn/trunk@13112 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-16 18:49:01 +00:00
commit-bot@chromium.org
9e90aed5de
Rename GrGLBinding->GrGLStandard, no longer a bitfield
...
BUG=skia:2042
R=jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/133413003
git-svn-id: http://skia.googlecode.com/svn/trunk@13108 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-16 16:35:09 +00:00
commit-bot@chromium.org
3aa7a02b65
SK_API SkMallocPixelRef
...
Motivation: make https://codereview.chromium.org/138393002/ work.
R=reed@google.com , djsollen@google.com , bsalomon@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/135853019
git-svn-id: http://skia.googlecode.com/svn/trunk@13106 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-16 14:46:16 +00:00
commit-bot@chromium.org
b06faacaf1
Factor out UnPreMultiplyPreservingByteOrder
...
BUG=
R=reed@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/130303005
git-svn-id: http://skia.googlecode.com/svn/trunk@13103 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 22:24:58 +00:00
reed@google.com
5f62ed7434
no need to refcnt colortables, since pixelrefs own them
...
BUG=skia:
R=halcanary@google.com , scroggo@google.com
Review URL: https://codereview.chromium.org/139463007
git-svn-id: http://skia.googlecode.com/svn/trunk@13098 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 19:59:45 +00:00
commit-bot@chromium.org
a3b15ed037
Make GrGLInterface be context-specific on all platforms
...
BUG=skia:2042
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/137753005
git-svn-id: http://skia.googlecode.com/svn/trunk@13097 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 19:32:03 +00:00
skia.committer@gmail.com
d77b3ecd92
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@13083 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 07:01:43 +00:00
senorblanco@chromium.org
a612d4c513
Implement a resize image filter. This is needed for the "filterRes" feature in SVG filter effects, which specifies the required size for intermediate processing buffers. In order to make this work, we need to render the primitive at the given resolution (doable at the callsite in Blink), and then to resize the result to the actual on-screen size. The latter is where this filter comes in.
...
It simply applies a scaling factor (and the current CTM) to its input, and draws its input bitmap at that size.
R=reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=13077
Reverted: https://code.google.com/p/skia/source/detail?r=13078
BUG=
Review URL: https://codereview.chromium.org/136863006
git-svn-id: http://skia.googlecode.com/svn/trunk@13082 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 04:49:18 +00:00
commit-bot@chromium.org
32678d9a45
use some helper Make functions to initialize SkImageInfo
...
BUG=
R=halcanary@google.com , scroggo@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/137993012
git-svn-id: http://skia.googlecode.com/svn/trunk@13081 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 02:38:22 +00:00
tfarina@chromium.org
62f1048ada
Deprecate two more functions using SK_ATTR_DEPRECATED macro.
...
BUG=None
TEST=None
R=reed@google.com , scroggo@google.com
Review URL: https://codereview.chromium.org/136973007
git-svn-id: http://skia.googlecode.com/svn/trunk@13079 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-15 00:19:21 +00:00
senorblanco@chromium.org
96673a918d
Revert "Implement a resize image filter."
...
This reverts commit 3f996e31c7043929fc1553b9b5ecd6a82b5fe125 (r13077).
TBR=reed
Review URL: https://codereview.chromium.org/136793012
git-svn-id: http://skia.googlecode.com/svn/trunk@13078 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-14 22:55:04 +00:00
senorblanco@chromium.org
535e1ccbd0
Implement a resize image filter. This is needed for the "filterRes" feature in SVG filter effects, which specifies the required size for intermediate processing buffers. In order to make this work, we need to render the primitive at the given resolution (doable at the callsite in Blink), and then to resize the result to the actual on-screen size. The latter is where this filter comes in.
...
It simply applies a scaling factor (and the current CTM) to its input, and draws its input bitmap at that size.
R=reed@google.com
Review URL: https://codereview.chromium.org/136863006
git-svn-id: http://skia.googlecode.com/svn/trunk@13077 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-14 22:20:48 +00:00
djsollen@google.com
8844f99780
Revert "Make leak counters thread-safe and turn them on by default for Debug"
...
iThis CL is breaking the Android debug test bots by firing an assert.
BUG=skia:1219
Review URL: https://codereview.chromium.org/138683006
git-svn-id: http://skia.googlecode.com/svn/trunk@13076 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-14 21:54:44 +00:00
commit-bot@chromium.org
19382421b9
Convert SkWriter32 to use an SkTDArray for its internal storage.
...
This reduces the allocation overhead of a null picture (create, beginRecording(), endRecording) from about 18K to about 1.9K. (There's still lots more to prune.)
SkPictureFlat can exploit the fact that Writer32 is contiguous simplify its memory management. The Writer32 itself becomes the scratch buffer.
Remove lots and lots of arbitrary magic numbers that were size guesses and minimum allocation sizes. Keep your eyes open for the big obvious DUH why we save 16K per picture! (Spoiler alert. It's because that first save we issue in beginRecording() forces the old SkWriter32 to allocate 16K.)
Tests passing, DM passing.
bench --match writer: ~20% faster
null bench_record: ~30% faster
bench_record on buildbot .skps: ~3-6% slower, ranging 25% faster to 20% slower
bench_pictures on buildbot .skps: ~1-2% faster, ranging 13% faster to 28% slower
BUG=skia:1850
R=reed@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/137433003
git-svn-id: http://skia.googlecode.com/svn/trunk@13073 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-14 20:51:26 +00:00
commit-bot@chromium.org
46de153d4e
Make leak counters thread-safe and turn them on by default for Debug
...
Make leak counters implemented with SK_DECLARE_INST_COUNT thread-safe.
Enable the leak counting for Debug builds.
Protect the instance counter initialization step (initStep) by
using SkOnce.
Makes SkOnce.h part of the public API, since SkInstCnt is public.
Protect the per-class child list shared variable with a per-class mutex.
Changes the behavior in the way that if the child list has been
"cleaned up", it will still try to create subsequent child lists.
BUG=skia:1219
Committed: http://code.google.com/p/skia/source/detail?r=12635
R=robertphillips@google.com , mtklein@google.com , bsalomon@google.com , bungeman@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/99483003
git-svn-id: http://skia.googlecode.com/svn/trunk@13068 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-14 18:42:26 +00:00
tfarina@chromium.org
5f43d21dd4
Remove drawPosTextOnPath() from SkDevice API.
...
All clients were updated including Chrome, so we can remove this now
from Skia.
This was committed on Chromium at
https://src.chromium.org/viewvc/chrome?view=rev&revision=244287
BUG=skia:1834
R=reed@google.com
Review URL: https://codereview.chromium.org/135583002
git-svn-id: http://skia.googlecode.com/svn/trunk@13059 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 21:42:25 +00:00
commit-bot@chromium.org
e13af711d4
Revert of https://codereview.chromium.org/132643007/
...
Reason for revert: broken tests
TBR=
NOTREECHECKS=true
NOTRY=true
BUG=
Author: reed@google.com
Review URL: https://codereview.chromium.org/134843008
git-svn-id: http://skia.googlecode.com/svn/trunk@13058 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:39:14 +00:00
reed@google.com
f0b56e7448
Revert "Revert of https://codereview.chromium.org/129423002/ "
...
fixed new api references in unit tests
This reverts commit ffc0058e1fbcbd69617e1f41b2dce5b5765ff99e.
BUG=
Review URL: https://codereview.chromium.org/132643007
git-svn-id: http://skia.googlecode.com/svn/trunk@13057 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:28:50 +00:00
commit-bot@chromium.org
9b06ba4c91
Revert of https://codereview.chromium.org/129423002/
...
Reason for revert: broke tests (compile)
R=scroggo@google.com , halcanary@google.com
TBR=halcanary@google.com , scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=
Author: reed@google.com
Review URL: https://codereview.chromium.org/137133003
git-svn-id: http://skia.googlecode.com/svn/trunk@13056 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:23:48 +00:00
reed@google.com
dd9ea9262c
add SkBitmap::installPixelRef()
...
BUG=
R=scroggo@google.com
Review URL: https://codereview.chromium.org/129423002
git-svn-id: http://skia.googlecode.com/svn/trunk@13055 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 20:17:58 +00:00
reed@google.com
1a033fb55e
remove (now dead code) for SK_SUPPORT_LEGACY_COLORTYPE and SK_SUPPORT_LEGACY_ALPHATYPE
...
BUG=
Review URL: https://codereview.chromium.org/135033002
git-svn-id: http://skia.googlecode.com/svn/trunk@13043 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 15:04:50 +00:00
reed@google.com
bf0001d047
remove remaining references to Sk64 (obsolete)
...
BUG=
Review URL: https://codereview.chromium.org/136673002
git-svn-id: http://skia.googlecode.com/svn/trunk@13042 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 14:53:55 +00:00
commit-bot@chromium.org
a7d89c83a4
Handle drawBitmapRect src_rect->dst_rect mapping as a local matrix rather than view matrix when there is a mask filter.
...
BUG=skia:1998
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/131323004
git-svn-id: http://skia.googlecode.com/svn/trunk@13041 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 14:47:00 +00:00
robertphillips@google.com
56bf6e4bce
Pull in Chromium's version of GatherPixelRefs
...
https://codereview.chromium.org/134473002/
git-svn-id: http://skia.googlecode.com/svn/trunk@13038 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 13:33:26 +00:00
reed@google.com
f3abaeb0c5
remove (now unused) Sk64 -- just use int64_t
...
BUG=
Review URL: https://codereview.chromium.org/134373006
git-svn-id: http://skia.googlecode.com/svn/trunk@13032 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-10 22:05:41 +00:00
halcanary@google.com
2d1adf2322
Reduce verbosity of SkGraphics::Init in default case.
...
SkGraphics::Init() now checks to see if there are any non-default
runtime configuration options before announcing that it is about
to print out the non-default runtime configuration options.
This makes the executables in tools/ less verbose.
Add SkRTConfRegistry::countNonDefault() function.
BUG=
R=mtklein@google.com , reed@google.com
Review URL: https://codereview.chromium.org/133583003
git-svn-id: http://skia.googlecode.com/svn/trunk@13017 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-10 15:00:45 +00:00
bungeman@google.com
18b75e54ab
Fix race on creating the default typeface.
...
BUG=skia:1906
R=mtklein@google.com , reed@google.com
Review URL: https://codereview.chromium.org/113543005
git-svn-id: http://skia.googlecode.com/svn/trunk@12993 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-09 17:13:32 +00:00
skia.committer@gmail.com
1ae9111f33
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@12980 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-09 07:01:42 +00:00
commit-bot@chromium.org
41bf930039
Rename GPU functions on SkBlurMaskFilter and pass ctm.
...
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/109823012
git-svn-id: http://skia.googlecode.com/svn/trunk@12978 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 22:25:53 +00:00
reed@google.com
1360c52b10
use SkImageInfo directly, instead of converting to SkBitmap::Config
...
BUG=
R=scroggo@google.com
Review URL: https://codereview.chromium.org/128933004
git-svn-id: http://skia.googlecode.com/svn/trunk@12972 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 21:25:26 +00:00
commit-bot@chromium.org
4b5fba5a3c
Use a spinlock in SkOnce.
...
SkOnceFlag is now statically initializable on all platforms.
Also adds sk_atomic_cas, used to implement new SkSpinlock.
Going to punt on making SkOnceFlag any smaller (for now, it's 8 bytes). We could conceivably get it down to two bits, one for done and one for a one-bit spinlock (we'd need atomic-& and atomic-| to make that work, but they appear to be available everywhere).
BUG=skia:1929
R=bungeman@google.com , reed@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/123093002
git-svn-id: http://skia.googlecode.com/svn/trunk@12968 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 21:15:56 +00:00
reed@google.com
672588b684
change offset to xy for pixelref subsetting
...
BUG=
R=scroggo@google.com
Review URL: https://codereview.chromium.org/105893012
git-svn-id: http://skia.googlecode.com/svn/trunk@12958 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 15:42:01 +00:00
commit-bot@chromium.org
40eb3c1000
Add AlphaThreshold filter.
...
This is based on the Bitmap Alpha Threshold filter, and will be used by Chromium
to implement the window shape API.
R=bsalomon@chromium.org , wez@chromium.org , bsalomon@google.com , reed@google.com
Author: zork@chromium.org
Review URL: https://codereview.chromium.org/115633002
git-svn-id: http://skia.googlecode.com/svn/trunk@12935 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 23:41:14 +00:00
reed@google.com
614cbeef47
remove SK_SUPPORTED_DEPRECATED_FIXEDROUND, no longer needed
...
git-svn-id: http://skia.googlecode.com/svn/trunk@12918 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 18:49:32 +00:00
commit-bot@chromium.org
c8d732800e
Renamed JsCanvas to JsContext and moved into it's own file.
...
Fleshed out a lot of the Path interface.
BUG=
R=robertphillips@google.com , tfarina@chromium.org , reed@google.com
Author: jcgregorio@google.com
Review URL: https://codereview.chromium.org/121303004
git-svn-id: http://skia.googlecode.com/svn/trunk@12913 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 18:17:24 +00:00
reed@google.com
d0419b1fe7
Revert "Revert "Revert "Revert of https://codereview.chromium.org/110593003/ """
...
This reverts commit aaa89649590323fe40f52439d9a9a3376bb3b8ae.
BUG=
Review URL: https://codereview.chromium.org/123223007
git-svn-id: http://skia.googlecode.com/svn/trunk@12910 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 17:08:27 +00:00
reed@google.com
7627c657b0
add rowBytes param to setPreLock, in prep for onNewLockPixels change
...
need _win.cc change from https://codereview.chromium.org/124503002/ when this lands in chrome
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/125063002
git-svn-id: http://skia.googlecode.com/svn/trunk@12907 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 15:01:48 +00:00
reed@google.com
ba82bd11e2
Revert "Revert "Revert of https://codereview.chromium.org/110593003/ ""
...
This reverts commit 0fef787f33aa38109a0c8427e0098d997efdd5ff.
failed in chrome: https://codereview.chromium.org/124503002/
Review URL: https://codereview.chromium.org/105523008
git-svn-id: http://skia.googlecode.com/svn/trunk@12906 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 13:34:39 +00:00
mike@reedtribe.org
9fb00413ec
SK_SUPPORTED_DEPRECATED_FIXEDROUND around deprecated fixed[round,ceil,floor]
...
git-svn-id: http://skia.googlecode.com/svn/trunk@12903 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 03:02:37 +00:00
skia.committer@gmail.com
98272d9142
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@12901 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-04 07:01:40 +00:00
senorblanco@chromium.org
6776b82d46
Make SkImageFilter crop rects relative to the primitive origin, instead of relative to their parent's crop rect. This is required by SVG semantics, and is more sane anyway.
...
To do this, this patch changes the "offset/loc" parameter in filterImage() / onFilterImage() from an inout-param to an out-param only, so that the calling filter can know how much the input filter wants its result offset (and doesn't include the original primitive position). This offset can then be applied to the current filter's crop rect. (I've renamed the parameter "offset" in all cases to make this clear.) This makes the call sites in SkCanvas/SkGpuDevice responsible for applying the resulting offset to the primitive's position, which is actually a fairly small change.
This change also fixes SkTileImageFilter and SkOffsetImageFilter to correctly handle an input offset, which they weren't before. This required modifying the GM's, since they assumed the broken behaviour.
NOTE: this will require rebaselining the imagefiltersgraph test, since it has a new test case.
NOTE: this will "break" the Blink layout tests css3/filters/effect-reference-subregion-chained-hw.html and css3/filters/effect-reference-subregion-hw.html, but it actually makes them give correct results. It should be suppressed on the skia roll, and I'll rebaseline it.
R=reed@google.com
Review URL: https://codereview.chromium.org/112803004
git-svn-id: http://skia.googlecode.com/svn/trunk@12895 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-03 21:48:22 +00:00
reed@google.com
927138977f
Revert "Revert of https://codereview.chromium.org/110593003/ "
...
This reverts commit c7abb25b25ba8b97948371d2bf0a2e3e78468f73.
and fixes the ashmem break
BUG=
Review URL: https://codereview.chromium.org/119753010
git-svn-id: http://skia.googlecode.com/svn/trunk@12887 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-03 17:58:57 +00:00