aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
...
* Add onGetBlendInfo to GrXferProcessorGravatar cdalton2015-04-23
| | | | | | | | | | | | | | Adds an onGetBlendInfo method for GrXferProcessor subclasses to override instead of overriding getBlendInfo directly. This gives the base class a chance to initialize the struct with default values before passing it on. As the BlendInfo struct grows, this will keep things simple and less error prone. BUG=skia: NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1049143002
* working on initial winding for cubicsGravatar caryclark2015-04-23
| | | | | | | | | | | Path ops works well for all tests except for cubics. Isolate failures caused by cubics, and do a better job of computing the initial winding for cubics. TBR=reed@google.com BUG=skia:3588 Review URL: https://codereview.chromium.org/1096923003
* Ensure that we create a NULL codec for images with zero dimensionsGravatar msarett2015-04-23
| | | | | | | BUG=skia:3534 BUG=skia:3257 Review URL: https://codereview.chromium.org/1091043003
* small fix for perf regression in GrAtlasTextContext.cppGravatar joshualitt2015-04-23
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1080673005
* use acquire/release in SkEventTracer.cppGravatar mtklein2015-04-22
| | | | | | BUG=chromium:437044 Review URL: https://codereview.chromium.org/1091283006
* Remove unnecessary viewmatrix compare in GrAtlasTextContextGravatar joshualitt2015-04-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1088903009
* [SkPDFDevice] Enable pathops-based inverse fillsGravatar fmalita2015-04-22
| | | | | | | | | Keeping the old compile guard for clipping only. BUG=skia:3749 R=halcanary@google.com,caryclark@google.com,reed@google.com Review URL: https://codereview.chromium.org/1099953002
* Remove MSAA check from Ganesh veto (dashed paths are no longer slow).Gravatar senorblanco2015-04-22
| | | | | | | R=egdaniel@google.com BUG=skia: Review URL: https://codereview.chromium.org/1098753004
* Move function to be static instead of anonymous namespaceGravatar egdaniel2015-04-22
| | | | | | | | TBR=bsalomon@google.com, jvanverth@google.com BUG=skia: Review URL: https://codereview.chromium.org/1057363004
* Fix for segfault on destruction of BitmapTextBlobGravatar joshualitt2015-04-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1065773005
* Improve the curve tessellation subdivision of the path renderers.Gravatar senorblanco2015-04-22
| | | | | | | | | | | | | | | | | | | The stencil-and-cover and tessellating path renderers currently tessellate curves to linear segments to within one screen space pixel. This is fairly poor accuracy, as can be seen from the strokecircle GM: there are noticeable rotating bumps on the circles. Improving the tolerance to 0.25 pixel eliminates the bumps, and approximates the 16x supersampling of the raster path. This does have a performance hit: 3-6% on desktop on the IE chalkboard demo, ~1% on Nexus 7 2013. Note: this will require rebaselining a number of GPU and MSAA images in Skia, but nothing in Chrome (yet). BUG=skia:3731 Review URL: https://codereview.chromium.org/1072273007
* Refactor createTexture and onCreateTextureGravatar egdaniel2015-04-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1102663002
* Revert of enable TextBlob / Batch (patchset #1 id:1 of ↵Gravatar joshualitt2015-04-22
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1077813004/) Reason for revert: seg fault Original issue's description: > enable TextBlob / Batch > > TBR=bsalomon@google.com > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/b75f8100ace48e74319ccf43d82deaac446784b2 TBR=bsalomon@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1096433007
* Fix for GrAtlasTextContext memory leakGravatar joshualitt2015-04-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1072193009
* Add tokens and entry points for KHR_blend_equation_advancedGravatar cdalton2015-04-22
| | | | | | | | | | Also adds glBlendEquation, which the extension interacts with, to the core of GrGLInterface. Validation of this function is temporarily disabled until Chrome hooks it up. BUG=skia: Review URL: https://codereview.chromium.org/1039693004
* enable TextBlob / BatchGravatar joshualitt2015-04-22
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1077813004
* O(1) SkPictureUtils::ApproxBytesUsed()Gravatar mtklein2015-04-21
| | | | | | | | | | 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
* Revert of Add tokens and entry points for KHR_blend_equation_advanced ↵Gravatar tomhudson2015-04-21
| | | | | | | | | | | | | | | | | | | | | | | | (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
* fix some small bugs with GrAtlasTextContextGravatar joshualitt2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1098093003
* Add tokens and entry points for KHR_blend_equation_advancedGravatar cdalton2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1039693004
* Import glTextureBarrierGravatar cdalton2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1090163002
* Support HWUI rename of DisplayListRendererGravatar tomhudson2015-04-21
| | | | | | R=djsollen@google.com,ccraik@google.com Review URL: https://codereview.chromium.org/1086083004
* Some simple optimizations for improving GrAtlasTextContext perfGravatar joshualitt2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1093083003
* Add support for rotating / scaling / translating gpu cached distance field ↵Gravatar joshualitt2015-04-21
| | | | | | | | textblobs BUG=skia: Review URL: https://codereview.chromium.org/1092283002
* Split default and user-supplied event tracers.Gravatar mtklein2015-04-21
| | | | | | | | | | | 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
* Store pointers to GrGlyph directly in BitmapTextBlob. This patch improves ↵Gravatar joshualitt2015-04-21
| | | | | | | | performance by avoiding hashmap lookups under normal use BUG=skia: Review URL: https://codereview.chromium.org/1087203004
* Revert of Convert Color32 code to perfect blend. (patchset #6 id:100001 of ↵Gravatar mtklein2015-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1098913002/) Reason for revert: Xfermode_SrcOver not looking encouraging. Up to 50% regressions. https://perf.skia.org/#3242 Original issue's description: > Convert Color32 code to perfect blend. > > Before we commit to blend_256_round_alt, let's make sure blend_perfect is > really slower in practice (i.e. regresses on perf.skia.org). > > blend_perfect is really the most desirable algorithm if we can afford it. Not > only is it correct, but it's easy to think about and break into correct pieces: > for instance, its div255() doesn't require any coordination with the multiply. > > This looks like a 30% hit according to microbenches. That said, microbenches > said my previous change would be a 20-25% perf improvement, but it didn't end > up showing a significant effect at a high level. > > As for correctness, I see a bunch of off-by-1 compared to blend_256_round_alt > (exactly what we'd expect), and one off-by-3 in a GM that looks like it has a > bunch of overdraw. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/61221e7f87a99765b0e034020e06bb018e2a08c2 TBR=reed@google.com,fmalita@chromium.org,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1083923006
* Pack BitmapTextBlob a bit tighterGravatar joshualitt2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1092973004
* reuse scaler across consecutive textbatch flushesGravatar joshualitt2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1091313002
* A small patch to enable distance field text in textblobsGravatar joshualitt2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1098653005
* SkTHash: remove()Gravatar mtklein2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1057043003
* Undo the bounds mapping of bounds for GrOvalRenderer for certain drawsGravatar egdaniel2015-04-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1099873002
* fix valgrind uninitialized var errorGravatar caryclark2015-04-21
| | | | | | R=mtklein@google.com Review URL: https://codereview.chromium.org/1097293002
* Make the GPU dashing effect MSAA-friendly.Gravatar senorblanco2015-04-20
| | | | Review URL: https://codereview.chromium.org/1092793006
* Regularize lmp::XXX_element_handler.Gravatar bungeman2015-04-20
| | | | | | | | | | | | | | This makes all non-XMLCALL element_handler functions uniform by making their signature void XXX_element_handler(FamilyData* self, const char** attributes) This makes the code somewhat easier to follow, as it makes explicit which functions are actually logically methods of FamilyData (start with 'FamilyData* self') and which are called directly by expat (start with 'void* data'). Review URL: https://codereview.chromium.org/1086943007
* Minor modifications to GrProgramDesc.h.Gravatar jvanverth2015-04-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1100483003
* Return correctly mapped bounds from GrOvalRenderer.Gravatar egdaniel2015-04-20
| | | | | | | | | | | | | | Before we were returning non transformed bounds for the ovals instead of device bounds from the various draw calls. This was causing us to do dst copies from the wrong portion of the screen when there was some transform on the matrix. This fixes the gpu issues from the new imagefilters-xfermodes gm as well an old bug from the srcmode GM. BUG=skia: Review URL: https://codereview.chromium.org/1090453003
* Regularize informative messages in Android font parser.Gravatar bungeman2015-04-20
| | | | | | | | The Android font parser prints a number of helpful messages when something seems amiss in the configuration file. Give all of these messages a common and more informative format. Review URL: https://codereview.chromium.org/1096063003
* Convert Color32 code to perfect blend.Gravatar mtklein2015-04-20
| | | | | | | | | | | | | | | | | | | | | Before we commit to blend_256_round_alt, let's make sure blend_perfect is really slower in practice (i.e. regresses on perf.skia.org). blend_perfect is really the most desirable algorithm if we can afford it. Not only is it correct, but it's easy to think about and break into correct pieces: for instance, its div255() doesn't require any coordination with the multiply. This looks like a 30% hit according to microbenches. That said, microbenches said my previous change would be a 20-25% perf improvement, but it didn't end up showing a significant effect at a high level. As for correctness, I see a bunch of off-by-1 compared to blend_256_round_alt (exactly what we'd expect), and one off-by-3 in a GM that looks like it has a bunch of overdraw. BUG=skia: Review URL: https://codereview.chromium.org/1098913002
* Now, path ops natively intersect conics, quads, and cubics in any ↵Gravatar caryclark2015-04-20
| | | | | | | | | | | combination. There are still a class of cubic tests that fail and a handful of undiagnosed failures from skps and fuzz tests, but things are much better overall. Extended tests (150M+) run to completion in release in about 6 minutes; the standard test suite exceeds 100K and finishes in a few seconds on desktops. TBR=reed BUG=skia:3588 Review URL: https://codereview.chromium.org/1037953004
* apply xfermode after imagefilter when we create a tmp layerGravatar reed2015-04-20
| | | | | | BUG=skia:3741 Review URL: https://codereview.chromium.org/1091173003
* Fix point count computation in tessellating path renderer.Gravatar senorblanco2015-04-20
| | | | | | | | | | | | | The conic, quadratic and cubic computations were using tolerance^2 instead of tolerance when computing maximum point count, causing paths to be undertessellated when magnifying and overtessellated when minifying. (Funny story: this bug went unnoticed back when we were tessellating paths in screen space, when tolerance and its square were both 1.) BUG=skia:3731 Review URL: https://codereview.chromium.org/1095773003
* remove dead code from SK_SUPPORT_LEGACY_BLITANTIH2V2Gravatar reed2015-04-20
| | | | | | | | | no image changes expected in skia or chrome/blink BUG=skia: TBR= Review URL: https://codereview.chromium.org/1050953003
* Respect declared font style on Android.Gravatar bungeman2015-04-17
| | | | | | | | | | | | | | | | | | | | Previously the normal/italic style bit was obtained from scanning the font file. With the new format the style may be stated explicitly, and this explicit value in the configuration file should override any information obtained from the font data itself. This change allows the font element's style attribute to override the font's style, but retains the default 'auto' setting for backwards compatibility. Repecting the style bit may become more important with variation fonts, because it will be up to the configuration writer to determine what values of the 'slnt' variation should be considered 'normal' or 'italic'. DOCS_PREVIEW= https://skia.org/?cl=1092093002 Committed: https://skia.googlesource.com/skia/+/673e902c9b9982a167f54f1cc175d8d9cab8bcaf Review URL: https://codereview.chromium.org/1092093002
* Revert of Respect declared font style on Android. (patchset #6 id:100001 of ↵Gravatar jcgregorio2015-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1092093002/) Reason for revert: Failed on the compile bots. Original issue's description: > Respect declared font style on Android. > > Previously the normal/italic style bit was obtained from scanning the > font file. With the new format the style may be stated explicitly, and > this explicit value in the configuration file should override any > information obtained from the font data itself. > > This change allows the font element's style attribute to override the > font's style, but retains the default 'auto' setting for backwards > compatibility. Repecting the style bit may become more important with > variation fonts, because it will be up to the configuration writer to > determine what values of the 'slnt' variation should be considered > 'normal' or 'italic'. > > DOCS_PREVIEW= https://skia.org/?cl=1092093002 > > Committed: https://skia.googlesource.com/skia/+/673e902c9b9982a167f54f1cc175d8d9cab8bcaf TBR=mtklein@google.com,tomhudson@google.com,scroggo@google.com,bungeman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1082173004
* PDF: Correctly embed JPEG images directly into PDF output.Gravatar halcanary2015-04-17
| | | | | | | | | We only embed images with YUV planes. That should only grab the subset of color JPEGs supported by PDF. BUG=skia:3180 Review URL: https://codereview.chromium.org/1025773002
* Respect declared font style on Android.Gravatar bungeman2015-04-17
| | | | | | | | | | | | | | | | | | Previously the normal/italic style bit was obtained from scanning the font file. With the new format the style may be stated explicitly, and this explicit value in the configuration file should override any information obtained from the font data itself. This change allows the font element's style attribute to override the font's style, but retains the default 'auto' setting for backwards compatibility. Repecting the style bit may become more important with variation fonts, because it will be up to the configuration writer to determine what values of the 'slnt' variation should be considered 'normal' or 'italic'. DOCS_PREVIEW= https://skia.org/?cl=1092093002 Review URL: https://codereview.chromium.org/1092093002
* Trace contention for lockPixels mutexGravatar enne2015-04-17
| | | | Review URL: https://codereview.chromium.org/1090103002
* Rework SSE and NEON Color32 algorithms to be more correct and faster.Gravatar mtklein2015-04-17
| | | | | | | | | | | | | | | | | | | | This algorithm changes the blend math, guarded by SK_LEGACY_COLOR32_MATH. The new math is more correct: it's never off by more than 1, and correct in all the interesting 0x00 and 0xFF edge cases, where the old math was never off by more than 2, and not always correct on the edges. If you look at tests/BlendTest.cpp, the old code was using the `blend_256_plus1_trunc` algorithm, while the new code uses `blend_256_round_alt`. Neither uses `blend_perfect`, which is about ~35% slower than `blend_256_round_alt`. This will require an unfathomable number of rebaselines, first to Skia, then to Blink when I remove the guard. I plan to follow up with some integer SIMD abstractions that can unify these two implementations into a single algorithm. This was originally what I was working on here, but the correctness gains seem to be quite compelling. The only places these two algorithms really differ greatly now is the kernel function, and even there they can really both be expressed abstractly as: - multiply 8-bits and 8-bits producing 16-bits - add 16-bits to 16-bits, returning the top 8 bits. All the constants are the same, except SSE is a little faster to keep 8 16-bit inverse alphas, NEON's a little faster to keep 8 8-bit inverse alphas. I may need to take this small speed win back to unify the two. We should expect a ~25% speedup on Intel (mostly from unrolling to 8 pixels) and a ~20% speedup on ARM (mostly from using vaddhn to add `color`, round, and narrow back down to 8-bit all into one instruction. (I am probably missing several more related bugs here.) BUG=skia:3738,skia:420,chromium:111470 Review URL: https://codereview.chromium.org/1092433002
* Remove filename from SkFontDescriptor.Gravatar bungeman2015-04-17
| | | | | | | | | | 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