mtklein
98b8485a4c
O(1) SkPictureUtils::ApproxBytesUsed()
...
Chrome wants to call this more often, and it's quite slow today.
Seems like this could be clearer if SkPictureUtils::ApproxBytesUsed() were SkPicture::approxBytesUsed().
BUG=chromium:471873
Review URL: https://codereview.chromium.org/1090943004
2015-04-21 15:24:00 -07:00
tomhudson
2575f317d3
Revert of Add tokens and entry points for KHR_blend_equation_advanced (patchset #3 id:40001 of https://codereview.chromium.org/1039693004/ )
...
Reason for revert:
We're getting repeated crashes since this CL landed when we try to evaluate a roll into Chrome on our bots. (https://uberchromegw.corp.google.com/i/client.skia/builders/Linux%20Tests/builds/1902 )
Our initial reflex is to put a #if 0 around this code (just like the immediately following lines 334-338 in GrGLInterface.cpp), but the error isn't what the GPU team expected to see if that was all we needed, so we're reverting now and asking you to resubmit tomorrow after running more thorough tests.
Original issue's description:
> Add tokens and entry points for KHR_blend_equation_advanced
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e578859f80b46a63144add215955221017d3609
TBR=markkilgard@gmail.com ,bsalomon@google.com,cdalton@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1101593002
2015-04-21 14:16:53 -07:00
cdalton
8e578859f8
Add tokens and entry points for KHR_blend_equation_advanced
...
BUG=skia:
Review URL: https://codereview.chromium.org/1039693004
2015-04-21 12:34:09 -07:00
cdalton
fd4167ddf1
Import glTextureBarrier
...
BUG=skia:
Review URL: https://codereview.chromium.org/1090163002
2015-04-21 11:45:56 -07:00
mtklein
59bcfaed66
Split default and user-supplied event tracers.
...
Chrome's got a test scenario where setting the user-supplied tracer is racing with a concurrent use of the default tracer.
BUG=chromium:437044
No public API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1099123002
2015-04-21 09:38:03 -07:00
mtklein
f3f9440372
Revert of Allow NEON on iOS. (patchset #3 id:40001 of https://codereview.chromium.org/1091823002/ )
...
Reason for revert:
need to coordinate this with chrome gyps/gn
Original issue's description:
> Allow NEON on iOS.
>
> I have nanobench building and running (Color32_arm_neon) on my iPad.
>
> No public API changes.
> TBR=reed@google.com
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e5043b7ea5170a639367b67c986568907576be4b
TBR=caryclark@google.com ,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1094843005
2015-04-17 14:02:40 -07:00
bungeman
9d911d5a93
Remove filename from SkFontDescriptor.
...
No one actually uses it, so remove it. Keep the string id for backward
compatibility.
TBR=reed@google.com
This doesn't change any public API.
Review URL: https://codereview.chromium.org/1057413005
2015-04-17 11:00:06 -07:00
bungeman
f4fddfc300
Correct SkFixedToDouble.
...
SkFixedToDouble uses the decimal floating point string representation
of 1/(2^16) to provide a constant value. This value is exactly
representable by a double but the decimal constant currently used
does not map to this value.
This change modifies this constant to more decimal digits so that
the actual double value desired is created.
Review URL: https://codereview.chromium.org/1097473002
2015-04-17 10:05:43 -07:00
mtklein
e5043b7ea5
Allow NEON on iOS.
...
I have nanobench building and running (Color32_arm_neon) on my iPad.
No public API changes.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1091823002
2015-04-17 06:36:53 -07:00
reed
ca1a22ee53
Revert of Revert of remove unused (by clients) SkPathUtils (patchset #1 id:1 of https://codereview.chromium.org/1060703003/ )
...
Reason for revert:
fix (removal from gypi/gn files) has landed in chrome.
Original issue's description:
> Revert of remove unused (by clients) SkPathUtils (patchset #1 id:1 of https://codereview.chromium.org/1088383003/ )
>
> Reason for revert:
> This change is causing the DEPS roll to fail:
>
>
> http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/78771/steps/gn/logs/stdio
>
> Original issue's description:
> > remove unused (by clients) SkPathUtils
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/aab35d91b8b80acd1902594bbf542083fdfa4bb7
>
> TBR=scroggo@google.com ,reed@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/bdb0bf5f8858043878d8a4fa8130c6c87bef3fd4
TBR=scroggo@google.com ,jcgregorio@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1091963002
2015-04-16 20:10:55 -07:00
bungeman
fd0ecf46ce
Add SkTPin.
...
Currently there exist SkScalarPin and SkPin32, and in a future change
another version is desired. This change introduces SkTPin and changes
SkScalarPin and SkPin32 to use it.
Review URL: https://codereview.chromium.org/1090003002
2015-04-16 12:18:28 -07:00
egdaniel
8dc7c3a839
Rename GrStencilBuffer to GrStencilAttachment
...
BUG=skia:
Review URL: https://codereview.chromium.org/1083133002
2015-04-16 11:22:42 -07:00
jcgregorio
bdb0bf5f88
Revert of remove unused (by clients) SkPathUtils (patchset #1 id:1 of https://codereview.chromium.org/1088383003/ )
...
Reason for revert:
This change is causing the DEPS roll to fail:
http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/78771/steps/gn/logs/stdio
Original issue's description:
> remove unused (by clients) SkPathUtils
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/aab35d91b8b80acd1902594bbf542083fdfa4bb7
TBR=scroggo@google.com ,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1060703003
2015-04-16 09:47:36 -07:00
reed
aab35d91b8
remove unused (by clients) SkPathUtils
...
BUG=skia:
Review URL: https://codereview.chromium.org/1088383003
2015-04-16 06:16:38 -07:00
bsalomon
bed83a66f5
Don't draw if SkShader::asNewFragmentProcessor fails.
...
BUG=chromium:473156
Review URL: https://codereview.chromium.org/1089063002
2015-04-15 14:18:34 -07:00
halcanary
00b7e5eb97
SkPDF/Device/ImageFilter: Fix ImageFilter fallback code
...
Broken in https://chromium.googlesource.com/skia/+/76033be
I have confirmed that this fixes 470083.
BUG=470083
Review URL: https://codereview.chromium.org/1080923004
2015-04-15 13:05:18 -07:00
joshualitt
9e36c1a930
Start canonicalizing color for all A8 textblobs
...
BUG=skia:
Review URL: https://codereview.chromium.org/1076593002
2015-04-14 12:17:27 -07:00
egdaniel
f103cd8539
Set resScale on stroker when stroking path on gpu.
...
BUG=skia:3686
Review URL: https://codereview.chromium.org/1048333003
2015-04-13 13:06:46 -07:00
robertphillips
25c40d25d7
Add serialization of SkBitmapSource's new filterQuality member variable
...
Missed this in https://codereview.chromium.org/1072603002/ (Add GM to repro crbug.com/472795)
Review URL: https://codereview.chromium.org/1078113002
2015-04-10 08:39:58 -07:00
joshualitt
0db6dfaeb2
The TextBlobCache needs the ability to trigger a flush because otherwise its entire budget can be used up, but it will not be able to free up any space due to blobs being stuck in the GrInOrderDrawBuffer. This was causing a segfault. After this CL the cache will try to purge, and then flush if it cannot purge enough. It will not purge the most recent addition to the cache.
...
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1071333002
2015-04-10 07:01:30 -07:00
mtklein
9ff378b01b
Rewrite memset benches, then use results to add a small-N optimization.
...
The benches for N <= 10 get around 2x faster on my N7 and N9. I believe this
is because of the reduced function-call-then-function-pointer-call overhead on
the N7, and additionally because it seems autovectorization beats our NEON code
for small N on the N9.
My desktop is unchanged, though that's probably because N=10 lies well within a
region where memset's performance is essentially constant: N=100 takes only
about 2x as long as N=1 and N=10, which perform nearly identically.
BUG=skia:
Review URL: https://codereview.chromium.org/1073863002
2015-04-09 14:05:17 -07:00
fmalita
055f6b59d8
[SkTextBlob] Custom run font record
...
Instead of using a full-blown SkPaint to store run font info, use a
custom structure.
This saves 96 bytes / run on 64bit platforms.
R=reed@google.com ,mtklein@google.com,joshualitt@google.com
Review URL: https://codereview.chromium.org/1070943002
2015-04-09 08:49:32 -07:00
robertphillips
e275fdf812
Add GM to repro crbug.com/472795
...
This CL also adds a new parameter to SkBitmapSource which gives the user control of the filter quality.
BUG=472795
Review URL: https://codereview.chromium.org/1072603002
2015-04-09 06:47:12 -07:00
fmalita
f57546ec7f
Remove SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS
...
No longer used in Chromium.
Also drop now-unused SkMatrix::Rot_pts() & SkMatrix::RotTrans_pts().
BUG=475022
R=reed@google.com ,mtklein@google.com
Review URL: https://codereview.chromium.org/1071833002
2015-04-09 06:13:15 -07:00
jbroman
7d1b945da6
Mark SkPictureRecorder::endRecording as SK_WARN_UNUSED_RESULT.
...
Ignoring the result is a memory leak.
Callers should always at least unref the result.
This bug has occurred in Blink:
https://codereview.chromium.org/1068413002/
BUG=skia:3680
Review URL: https://codereview.chromium.org/1072633002
2015-04-09 06:12:17 -07:00
halcanary
16e833d5aa
SkString: remove fStr member
...
Motivation: I'd like sizeof(SkString) to be the same in Debug and Release.
Review URL: https://codereview.chromium.org/1073473003
2015-04-08 13:01:22 -07:00
mtklein
feaadee1c3
SkCanvas::resetForNextPicture()
...
No diffs against head for DM --config 8888 gpu 2ndpic-8888 2ndpic-gpu.
picture_overhead_draw 1.62us -> 1.6us 0.99x
picture_overhead_nodraw 792ns -> 342ns 0.43x
tiles and serialization modes will also test this a bit.
BUG=chromium:470553
Committed: https://skia.googlesource.com/skia/+/f920e468ac66a36c9653d1b11181480295044c7d
Review URL: https://codereview.chromium.org/1067893002
2015-04-08 11:25:48 -07:00
bsalomon
3f324321cd
Add mechanism to proactively purge old resources in GrResourceCache.
...
This change leaves the feature turned off by default.
Review URL: https://codereview.chromium.org/1032873002
2015-04-08 11:01:55 -07:00
joshualitt
b7133bed55
Adding a cache + memory pool for GPU TextBlobs
...
BUG=skia:
Review URL: https://codereview.chromium.org/1055843002
2015-04-08 09:08:31 -07:00
bsalomon
e4579adfdf
Add helper for creating a SkSurface from a client created texture.
...
Review URL: https://codereview.chromium.org/1071603002
2015-04-08 08:38:40 -07:00
caryclark
95bc5f3495
change isNestedRect to isNestedFillRect
...
R=reed@google.com , bsalomon@google.com
Let isNested(Fill)Rect return true if drawn path describes filled
rectangles.
Review URL: https://codereview.chromium.org/1073473002
2015-04-08 08:34:15 -07:00
joshualitt
f1f8895cbe
add realloc method to SkAutoSTMalloc
...
BUG=skia:
Review URL: https://codereview.chromium.org/1069013002
2015-04-08 07:33:33 -07:00
mtklein
c654e9016a
Revert of SkCanvas::resetForNextPicture() (patchset #4 id:60001 of https://codereview.chromium.org/1067893002/ )
...
Reason for revert:
https://uberchromegw.corp.google.com/i/client.skia/builders/Linux%20Tests/builds/1816
Original issue's description:
> SkCanvas::resetForNextPicture()
>
> No diffs against head for DM --config 8888 gpu 2ndpic-8888 2ndpic-gpu.
>
> picture_overhead_draw 1.62us -> 1.6us 0.99x
> picture_overhead_nodraw 792ns -> 342ns 0.43x
>
> tiles and serialization modes will also test this a bit.
>
> BUG=chromium:470553
>
> Committed: https://skia.googlesource.com/skia/+/f920e468ac66a36c9653d1b11181480295044c7d
TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:470553
Review URL: https://codereview.chromium.org/1062353002
2015-04-07 15:27:14 -07:00
mtklein
f920e468ac
SkCanvas::resetForNextPicture()
...
No diffs against head for DM --config 8888 gpu 2ndpic-8888 2ndpic-gpu.
picture_overhead_draw 1.62us -> 1.6us 0.99x
picture_overhead_nodraw 792ns -> 342ns 0.43x
tiles and serialization modes will also test this a bit.
BUG=chromium:470553
Review URL: https://codereview.chromium.org/1067893002
2015-04-07 14:11:22 -07:00
reed
687fa1c745
restore clipstack to heap-ptr, so clients can ref it
...
BUG=skia:
Review URL: https://codereview.chromium.org/1068883004
2015-04-07 08:00:56 -07:00
scroggo
5965b73e54
Revert of Remove now-redundant SkPathOps enum. (patchset #1 id:1 of https://codereview.chromium.org/1051113005/ )
...
Reason for revert:
Android is still using this. See 4c2968b94c/logs/build_error.log
Original issue's description:
> Remove now-redundant SkPathOps enum.
>
> R=caryclark,reed
> BUG=473772
>
> Committed: https://skia.googlesource.com/skia/+/143244e27d95255807d8fa505ce0affef96d1fc8
TBR=caryclark@google.com ,reed@google.com,schenney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=473772
Review URL: https://codereview.chromium.org/1068873002
2015-04-07 06:53:21 -07:00
mtklein
e35268ef4c
Send SkPicture deletion message lazily.
...
If no one has read the picture's unique ID, there's no point invalidating it.
This is the same trick we pull with SkPixelRefs.
Before:
26M 1 1.49µs 1.6µs 1.77µs 6.25µs 42% picture_overhead_draw
13M 32 742ns 749ns 756ns 823ns 2% picture_overhead_nodraw
After:
26M 1 1.27µs 1.33µs 1.49µs 5.51µs 45% picture_overhead_draw
14M 43 677ns 680ns 681ns 701ns 1% picture_overhead_nodraw
BUG=skia:
Review URL: https://codereview.chromium.org/1061283002
2015-04-07 06:34:05 -07:00
reed
b679ca8926
reduce alloc overhead for SkCanvas
...
use pre-allocated space in the canvas to avoid initial calls to malloc
BUG=skia:
Review URL: https://codereview.chromium.org/1060583007
2015-04-07 04:40:48 -07:00
schenney
143244e27d
Remove now-redundant SkPathOps enum.
...
R=caryclark,reed
BUG=473772
Review URL: https://codereview.chromium.org/1051113005
2015-04-06 09:37:56 -07:00
mtklein
76f5cc6e9e
Clean up BlockRef
...
- It's no longer needed to help the (2011?) transition to SkAutoTUnref.
- It prevents us from making classes that go in SkAutoTUnrefs final,
i.e. all ref-counted classes.
This had better not have been public API...
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1068443002
2015-04-06 08:57:32 -07:00
scroggo
028a4135aa
Add a method to read a stream without advancing it.
...
Add a virtual method on SkStream which will do a "peek" some bytes, so
that those bytes are read, but the next call to read will be
unaffected.
Implement peek for SkMemoryStream, where the implementation is simple
and obvious.
Implement peek on SkFrontBufferedStream.
Add tests.
Motivated by decoding streams which cannot be rewound.
TBR=reed@google.com
BUG=skia:3257
Review URL: https://codereview.chromium.org/1044953002
2015-04-02 13:19:51 -07:00
borenet
4808757d7a
Remove all code related to NaCl
...
BUG=skia:3600
DOCS_PREVIEW= https://skia.org/?cl=1036283002
Review URL: https://codereview.chromium.org/1036283002
2015-04-02 12:16:36 -07:00
bsalomon
c9c3e62b4e
Add constant color GrFP.
...
Committed: https://skia.googlesource.com/skia/+/dfbbec436cbcacc3270d4b28357c8393e67d6494
Review URL: https://codereview.chromium.org/978713002
2015-04-02 11:12:09 -07:00
joshualitt
dbd3593e0b
Rename GrBitmapTextContextB to GrAtlasTextContext
...
BUG=skia:
Review URL: https://codereview.chromium.org/1050173002
2015-04-02 09:19:04 -07:00
bsalomon
599ea40cec
Revert of Add constant color GrFP. (patchset #10 id:180001 of https://codereview.chromium.org/978713002/ )
...
Reason for revert:
Revert while investigating assertions.
Original issue's description:
> Add constant color GrFP.
>
> Committed: https://skia.googlesource.com/skia/+/dfbbec436cbcacc3270d4b28357c8393e67d6494
TBR=egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1055023002
2015-04-02 08:33:54 -07:00
bsalomon
dfbbec436c
Add constant color GrFP.
...
Review URL: https://codereview.chromium.org/978713002
2015-04-01 14:54:57 -07:00
joshualitt
2b6acb4ed5
Switch to one single bitmap text blob cache allocation
...
BUG=skia:
Review URL: https://codereview.chromium.org/1041953002
2015-04-01 11:30:28 -07:00
scroggo
5842154480
SkCodec::onGetScanlineDecoder must call rewind.
...
This mirrors the behavior in onGetPixels, and allows the implementation
to share code for handling calls to rewindIfNeeded.
This also fixes a bug where getScanlineDecoder was calling
rewindIfNeeded and treating the result as a bool.
In SkPngCodec, factor out the code to call rewindIfNeeded, and call it
in both onGetPixels and onGetScanlineDecoder.
Update the test to include testing the scanline decoder. Rename "gen"
to "codec" now that it must be an SkCodec.
BUG=skia:3257
Depends on https://codereview.chromium.org/1048423003/ (DIFFERENT ISSUE).
Review URL: https://codereview.chromium.org/1050893002
2015-04-01 11:25:20 -07:00
vbuzinov
08b4d29a0a
GrGLInterface: Add support for NV_framebuffer_mixed_samples
...
Import glCoverageModulation if NV_framebuffer_mixed samples
is available
BUG=skia:3177
Review URL: https://codereview.chromium.org/993363002
2015-04-01 06:29:49 -07:00
joshualitt
7c3a2f834e
BitmapTextBatch and BitmapTextBlob
...
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984
Review URL: https://codereview.chromium.org/1011403004
2015-03-31 13:32:05 -07:00