aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Adding a cache + memory pool for GPU TextBlobsGravatar joshualitt2015-04-08
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1055843002
* SkPDF: Remove Array's unused set(i) and get(i) (leaving only append())Gravatar halcanary2015-04-08
| | | | | | BUG=skia:3585 Review URL: https://codereview.chromium.org/1071583003
* Add helper for creating a SkSurface from a client created texture.Gravatar bsalomon2015-04-08
| | | | Review URL: https://codereview.chromium.org/1071603002
* change isNestedRect to isNestedFillRectGravatar caryclark2015-04-08
| | | | | | | | | 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
* Adding bulk plot reffer to cached textblobsGravatar joshualitt2015-04-08
| | | | | | | | | | | This change will prevent the atlas from evicting glyphs the TextBlob needs. BUG=skia: Committed: https://skia.googlesource.com/skia/+/7281c61e7bc689d484dcbda49be3cef4ce4f11c2 Review URL: https://codereview.chromium.org/1050113004
* Add missing override of willSaveLayer()Gravatar tomhudson2015-04-08
| | | | | | | | | Also tweak formatting. BUG=3624 R=djsollen@google.com Review URL: https://codereview.chromium.org/1068163004
* Revert of SkCanvas::resetForNextPicture() (patchset #4 id:60001 of ↵Gravatar mtklein2015-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* SkCanvas::resetForNextPicture()Gravatar mtklein2015-04-07
| | | | | | | | | | | | | 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
* Switch textures created by DeviceImageFilterProxy toGravatar senorblanco2015-04-07
| | | | | | | | | | | | | | | | | | | approx-match. This revealed some further 0..1 texture coordinate depedencies,specifically in SkDisplacementMapEffect and SkXfermodeImageFilter, fixed through use of GrTextureDomain. Note: causes minor pixel diffs in pictureimagefilter, testimagefilters GMs. Also causes minor pixel diffs in some Blink layout tests, suppressed here: https://codereview.chromium.org/1064943002 BUG=skia:3532 Review URL: https://codereview.chromium.org/1065683002
* re-enable neon opts for some xfermodesGravatar reed2015-04-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1068783003
* SkPDF: SkPDFString is no longer aware of wide strings.Gravatar halcanary2015-04-07
| | | | | | | | | | | | Since wide strings are only used in SkPDFDevice, I have moved the function that manages them to that directory. Motivation: The SkPDFString will be refactored later along with the other SkPFObject heirarchy. BUG=skia:3585 Review URL: https://codereview.chromium.org/1064013003
* Revert of Adding bulk plot reffer to cached textblobs (patchset #7 id:110001 ↵Gravatar joshualitt2015-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1050113004/) Reason for revert: Breaks linux builder Original issue's description: > Adding bulk plot reffer to cached textblobs > > This change will prevent the atlas from evicting glyphs the TextBlob > needs. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/7281c61e7bc689d484dcbda49be3cef4ce4f11c2 TBR=bsalomon@google.com,jvanverth@google.com,robertphillips@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1061713003
* Adding bulk plot reffer to cached textblobsGravatar joshualitt2015-04-07
| | | | | | | | | This change will prevent the atlas from evicting glyphs the TextBlob needs. BUG=skia: Review URL: https://codereview.chromium.org/1050113004
* Calculate inverse scale for distance field text in vertex shaderGravatar jvanverth2015-04-07
| | | | | | | | | | | | This is for the uniform scale case only. Using the dFdx() function on certain Mali GPUs causes issues because the precision is too low, so we have to compute 1/scale from the view matrix instead. BUG=skia:3528 Committed: https://skia.googlesource.com/skia/+/5b143038cb47763974d2750ed78d436eb6c38bea Review URL: https://codereview.chromium.org/1029423003
* restore clipstack to heap-ptr, so clients can ref itGravatar reed2015-04-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1068883004
* Attempted mitigation of font tables released early.Gravatar bungeman2015-04-07
| | | | | | | | | On Mac, it appears that sometimes fonts created from data have their table data used after the table data copy is freed. This appears to be most common with 'sbix' fonts for some reason, so pin that table while in use. Review URL: https://codereview.chromium.org/1061123002
* Set willReadFragmentPosition on XP when doing a DstCopy.Gravatar egdaniel2015-04-07
| | | | | | BUG=472872 Review URL: https://codereview.chromium.org/1068463004
* Revert of Remove now-redundant SkPathOps enum. (patchset #1 id:1 of ↵Gravatar scroggo2015-04-07
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1051113005/) Reason for revert: Android is still using this. See https://android-build.storage.googleapis.com/builds/git_master-skia-linux-razor-userdebug/1836783/4c2968b94c5f4b238ff5ba61111bf867ea872fd8dce930612f376711883419b8/logs/build_error.log?GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Signature=ATvg9ZvwZGFDDVb%2B1Ue2WHVGaCCL1hAD7QjXeZv2gBT08I3JaKLcseUhV5K2G%2F%2BWUnsnSgNNjzjBnBLmnPbK9Uu8NC%2B%2F5J0dU3sKD8TU9dvMtkQhFQSp2x5t5Xxf5mczi2EPps%2FwoPHqTKQqrMgqStySzw206W1%2Fc135RrdrgYg%3D&Expires=1428415459 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
* Send SkPicture deletion message lazily.Gravatar mtklein2015-04-07
| | | | | | | | | | | | | | | | | | 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
* simplify xfersGravatar reed2015-04-07
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1061193003
* reduce alloc overhead for SkCanvasGravatar reed2015-04-07
| | | | | | | | use pre-allocated space in the canvas to avoid initial calls to malloc BUG=skia: Review URL: https://codereview.chromium.org/1060583007
* Revert of Calculate inverse scale for distance fields in vertex shader ↵Gravatar jvanverth2015-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #6 id:100001 of https://codereview.chromium.org/1029423003/) Reason for revert: This appears to be breaking large text on Nexus 7. Original issue's description: > Calculate inverse scale for distance field text in vertex shader > > This is for the uniform scale case only. Using the dFdx() function on certain > Mali GPUs causes issues because the precision is too low, so we have to > compute 1/scale from the view matrix instead. > > BUG=skia:3528 > > Committed: https://skia.googlesource.com/skia/+/5b143038cb47763974d2750ed78d436eb6c38bea TBR=bsalomon@google.com,joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3528 Review URL: https://codereview.chromium.org/1066613003
* fix valgrind bugGravatar caryclark2015-04-06
| | | | | | | R=mtklein BUG=skia:3654 Review URL: https://codereview.chromium.org/1064663003
* Calculate inverse scale for distance field text in vertex shaderGravatar jvanverth2015-04-06
| | | | | | | | | | This is for the uniform scale case only. Using the dFdx() function on certain Mali GPUs causes issues because the precision is too low, so we have to compute 1/scale from the view matrix instead. BUG=skia:3528 Review URL: https://codereview.chromium.org/1029423003
* Handle large paths in textblobsGravatar joshualitt2015-04-06
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1057613002
* When wrapping external textures, clamp the MSAA sample count to max.Gravatar senorblanco2015-04-06
| | | | | | | | | | | This is the same clamp we do in onCreateTexture() for Skia-native textures. Without this fix, setting to a count higher than the max in Chrome results in a black screen. BUG=skia: Review URL: https://codereview.chromium.org/1056253003
* Remove now-redundant SkPathOps enum.Gravatar schenney2015-04-06
| | | | | | | R=caryclark,reed BUG=473772 Review URL: https://codereview.chromium.org/1051113005
* Code's more readable when SkPMFloat is an Sk4f.Gravatar mtklein2015-04-03
| | | | | | | | | | | | | #floats BUG=skia: BUG=skia:3592 Committed: https://skia.googlesource.com/skia/+/6b5dab889579f1cc9e1b5278f4ecdc4c63fe78c9 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot Review URL: https://codereview.chromium.org/1061603002
* Revert of Code's more readable when SkPMFloat is an Sk4f. (patchset #3 ↵Gravatar mtklein2015-04-03
| | | | | | | | | | | | | | | | | | | | | | | | id:40001 of https://codereview.chromium.org/1061603002/) Reason for revert: missed some neon code Original issue's description: > Code's more readable when SkPMFloat is an Sk4f. > #floats > > BUG=skia: > BUG=skia:3592 > > Committed: https://skia.googlesource.com/skia/+/6b5dab889579f1cc9e1b5278f4ecdc4c63fe78c9 TBR=reed@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1056143004
* Code's more readable when SkPMFloat is an Sk4f.Gravatar mtklein2015-04-03
| | | | | | | | | #floats BUG=skia: BUG=skia:3592 Review URL: https://codereview.chromium.org/1061603002
* Enable both static and dynamically linked libpngGravatar djsollen2015-04-03
| | | | | | | | | | | All platforms except android are configured to use the statically linked copy of libpng. Android uses the system provided dynamic copy for SkImageDecoder and the static copy for SkCodec. The exception being android framework builds that currently use the dynamic copy everywhere. This CL also enables NEON optimizations for libpng. Review URL: https://codereview.chromium.org/1058823002
* enable sk4f xfermodesGravatar reed2015-04-03
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1061543002
* BUG=skia:Gravatar joshualitt2015-04-03
| | | | Review URL: https://codereview.chromium.org/1031423002
* Get rid of leaks in SkCodec::NewFromStream.Gravatar scroggo2015-04-03
| | | | | | | | | | | | | | | | | | | | SkCodec::NewFromStream claims to delete the passed in SkStream on failure. This allows the caller to pass an SkStream to the function and not worry about deleting it depending on the return value. Most of our SkCodecs did not honor this contract though. Update them to delete the stream on failure. Further, update SkCodec::NewFromStream to delete the stream if it did not match any subclass, and delete the SkCodec if we decided to return NULL because it was too big. Add a test which tests streams which represent the beginnings of supported format types but do not contain enough data to create an SkCodec. The interesting part of the test is when we run it on ASAN, which will report that we leaked something without the other changes. BUG=skia:3257 Review URL: https://codereview.chromium.org/1058873006
* New names for SkPMFloat methods.Gravatar mtklein2015-04-03
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1055123002
* Use switch operator[](int) to kth<int>() so we can use vget_lane.Gravatar mtklein2015-04-03
| | | | | | | | | #floats BUG=skia: BUG=skia:3592 Review URL: https://codereview.chromium.org/1059743002
* Exclusion and Difference modes using Sk4fGravatar reed2015-04-02
| | | | | | | | | | | | | | Before: 7M 1 15.3ms 15.5ms 15.8ms 17.2ms 4% ▁█▄▁▇▂▁▁▂▁ 8888 Xfermode_Exclusion 7M 1 16.5ms 17.1ms 17.3ms 18.8ms 5% ▁█▃█▃▂▂▃▂▂ 8888 Xfermode_Difference After: 7M 1 9.06ms 9.34ms 9.42ms 10.4ms 4% ▁▁▅▄█▁▂▁▂▃ 8888 Xfermode_Exclusion 7M 1 10.5ms 10.9ms 11ms 12ms 5% ▃▁▆█▂▁▅▂▁▃ 8888 Xfermode_Difference TBR=mtklein@google.com Review URL: https://codereview.chromium.org/1060493002
* impl Multiply mode using Sk4fGravatar reed2015-04-02
| | | | | | | | | | | | Before: 7M 1 14.4ms 14.8ms 15.4ms 17.5ms 7% ▆█▅▅▂▁▁▁▂▁ 8888 Xfermode_Multiply After: 7M 1 12ms 12.1ms 12.5ms 14.1ms 6% ▃█▇▂▁▂▁▁▂▁ 8888 Xfermode_Multiply TBR=mtklein@google.com Review URL: https://codereview.chromium.org/1056003002
* Add a method to read a stream without advancing it.Gravatar scroggo2015-04-02
| | | | | | | | | | | | | | | | | | | | | 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
* experimental speedup some xfermodes with Sk4fGravatar reed2015-04-02
| | | | | | | | | | | | | | | | | | | | | | Old: 7M 1 11.1ms 11.3ms 11.3ms 11.6ms 1% ▅▄▂▂▁▁▄▄█▇ 8888 Xfermode_Screen 7M 1 10.7ms 10.9ms 10.9ms 11.1ms 1% ▄▄▄▇▃▁█▄▂▅ 8888 Xfermode_Modulate 7M 1 7.86ms 8.03ms 8ms 8.18ms 1% █▇▅▁▃▃▂▃▆▅ 8888 Xfermode_Plus 7M 1 14.6ms 14.8ms 14.8ms 15.1ms 1% ▄█▆▅▄▁▁▆▄▆ 8888 Xfermode_Xor 7M 1 13ms 13.5ms 13.4ms 13.8ms 2% ▅▃▇▁█▂▃▅▃▅ 8888 Xfermode_DstATop 7M 1 13.1ms 13.4ms 13.3ms 13.6ms 1% ▄▁▁▆▅▄▇▆█▂ 8888 Xfermode_SrcATop New: 7M 1 6.99ms 7.19ms 7.4ms 8.98ms 8% ▁▂▁▃▂█▁▂▂▂ 8888 Xfermode_Screen 7M 1 5.27ms 5.46ms 5.46ms 5.89ms 3% ▁▁▅▁▂█▄▃▄▃ 8888 Xfermode_Modulate 7M 1 6.8ms 7.04ms 7.27ms 8.53ms 8% ▂▁█▁▁▂▂▂▂▇ 8888 Xfermode_Plus 7M 1 9ms 9.2ms 9.33ms 10.5ms 5% ▁█▃▁▂▁▁▁▅▂ 8888 Xfermode_Xor 7M 1 8.34ms 8.57ms 8.73ms 10.6ms 8% ▁▁▁▂▂▂▂▂▂█ 8888 Xfermode_DstATop 7M 1 8.38ms 8.62ms 8.91ms 10.3ms 8% ▁▃▁▂▇▂▁▂▁█ 8888 Xfermode_SrcATop Need to define SK_SUPPORT_LEGACY_SCALAR_XFERMODES in chrome to suppress change (see https://codereview.chromium.org/1054083002/) Review URL: https://codereview.chromium.org/1043413002
* I suspect S32A_D565_Opaque_neon for Daisy problems.Gravatar Mike Klein2015-04-02
| | | | | | | | | | | I don't see any color-order handling logic in the 32-bit code. BUG=skia:1843 CQ_EXCLUDE_TRYBOTS=client.skia.compile:Build-Win-MSVC-x86-Debug-Trybot,Build-Win-MSVC-x86_64-Debug-Trybot R=mtklein@google.com Review URL: https://codereview.chromium.org/1051683003
* Remove all code related to NaClGravatar borenet2015-04-02
| | | | | | | BUG=skia:3600 DOCS_PREVIEW= https://skia.org/?cl=1036283002 Review URL: https://codereview.chromium.org/1036283002
* SkPMFloat: fewer internal this->isValid() assertions.Gravatar mtklein2015-04-02
| | | | | | | | | | | | | Each of these conversion functions now only asserts is output is valid. For SkPMColor -> SkPMFloat, we assert isValid(). For SkPMFloat -> SkPMColor, we SkPMColorAssert. #floats BUG=skia: BUG=skia:3592 Review URL: https://codereview.chromium.org/1055093002
* Add constant color GrFP.Gravatar bsalomon2015-04-02
| | | | | | Committed: https://skia.googlesource.com/skia/+/dfbbec436cbcacc3270d4b28357c8393e67d6494 Review URL: https://codereview.chromium.org/978713002
* Rename GrBitmapTextContextB to GrAtlasTextContextGravatar joshualitt2015-04-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1050173002
* Revert of Add constant color GrFP. (patchset #10 id:180001 of ↵Gravatar bsalomon2015-04-02
| | | | | | | | | | | | | | | | | | | 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
* Implement approx-match support in image filter saveLayer() offscreen.Gravatar senorblanco2015-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the GPU-side image filter implementation creates exact-match textures for the offscreen backing stores for saveLayer(). This is because several filters have GPU implementations which depend on the texture coordinates being 0..1. The fix is three-fold: 1) Store the actual requested size in the SkGpuDevice, so that when wrapping it in an SkBitmap for passing to filterImage(), we can give it the original size. 2) Fix the filters (SkMagnifierImageFilter, SkLightingImageFilter, SkMatrixConvolutionImageFilter, SkMatrixImageFilter) whose GPU implementation depends on 0..1 texture coordinates. 3) Remove the exception for GPU-side image filters in SkCanvas::internalSaveLayer(). For the lighting filters, there were two bugs which were cancelling each other out: the sobel filter matrix was being computed upside down, but then we'd negate the resulting normal. This worked fine in the exact-match case, but in the approx-match case we'd sample garbage along the edge pixels. Also, we never implemented the edge pixels according to spec in the GPU case. It requires a different fragment shader for each edge of the nine-patch, which meant we couldn't use asFragmentProcessor(), and had to implement the drawing via a filterImageGPU() override. In order to avoid polluting the public API, I inserted a new base class, SkLightingImageFilterInternal above Sk[Diffuse|Specular]LightingImageFilter to handle the implementation. For the SkMatrixConvolutionImageFilter, it seems the GLSL clamp() function occasionally returns values outside the clamped range, resulting in access of garbage texels even in GL_NEAREST. The fix here is to clamp to a rect inset by half a texel. There was also a bug in the unpremultiply step when fConvolveAlpha is false. For SkMatrixImageFilter, the fix was to make the generic draw path be more careful about when to use texture domain. If the bitmap already has a texture, use texture domain if the srcRect is smaller than the entire texture (not the entire bitmap). N.B.: this change will cause some minor pixel diffs in the GPU results of the following GMs (and possibly more): matriximagefilter, matrixconvolution, imagefiltersscaled, lighting, imagemagnifier, filterfastbounds, complexclip_aa_Layer_invert, complexclip_aa_layer, complexclip_bw_layer_invert, complexclip_bw_layer. BUG=skia:3532 Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9 Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641 Committed: https://skia.googlesource.com/skia/+/46112cf2a7c7307f1c9eebb5f881cbda15aa460c Review URL: https://codereview.chromium.org/1034733002
* [SkDebugger] Flatten drawPicture opsGravatar fmalita2015-04-01
| | | | | | | Add two drawPicture bracketing ops (BeginDrawPicture, EndDrawPicture) to replace the current DrawPicture op, and flatten picture contents. Review URL: https://codereview.chromium.org/1048383002
* Revert of Implement approx-match support in image filter saveLayer() ↵Gravatar rmistry2015-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | offscreen. (patchset #31 id:590001 of https://codereview.chromium.org/1034733002/) Reason for revert: Spoke to Stephen about this. Reverting because failing debug builds: https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/51 https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/54 Original issue's description: > Implement approx-match support in image filter saveLayer() offscreen. > > Currently, the GPU-side image filter implementation creates > exact-match textures for the offscreen backing stores for > saveLayer(). This is because several filters have GPU > implementations which depend on the texture coordinates > being 0..1. > > The fix is three-fold: > > 1) Store the actual requested size in the SkGpuDevice, so > that when wrapping it in an SkBitmap for passing to > filterImage(), we can give it the original size. > 2) Fix the filters (SkMagnifierImageFilter, > SkLightingImageFilter, SkMatrixConvolutionImageFilter, > SkMatrixImageFilter) whose GPU implementation depends on > 0..1 texture coordinates. > 3) Remove the exception for GPU-side image filters in > SkCanvas::internalSaveLayer(). > > For the lighting filters, there were two bugs which were > cancelling each other out: the sobel filter matrix was > being computed upside down, but then we'd negate the > resulting normal. This worked fine in the exact-match case, > but in the approx-match case we'd sample garbage along > the edge pixels. Also, we never implemented the edge pixels > according to spec in the GPU case. It requires a > different fragment shader for each edge of the nine-patch, > which meant we couldn't use asFragmentProcessor(), and had > to implement the drawing via a filterImageGPU() override. > In order to avoid polluting the public API, I inserted a > new base class, SkLightingImageFilterInternal above > Sk[Diffuse|Specular]LightingImageFilter to handle the > implementation. > > For the SkMatrixConvolutionImageFilter, it seems the > GLSL clamp() function occasionally returns values outside > the clamped range, resulting in access of garbage > texels even in GL_NEAREST. The fix here is to clamp to a > rect inset by half a texel. There was also a bug in > the unpremultiply step when fConvolveAlpha is false. > > For SkMatrixImageFilter, the fix was to make the generic > draw path be more careful about when to use texture domain. > If the bitmap already has a texture, use texture domain > if the srcRect is smaller than the entire texture (not > the entire bitmap). > > N.B.: this change will cause some minor pixel diffs in the > GPU results of the following GMs (and possibly more): > matriximagefilter, matrixconvolution, imagefiltersscaled, > lighting, imagemagnifier, filterfastbounds, > complexclip_aa_Layer_invert, complexclip_aa_layer, > complexclip_bw_layer_invert, complexclip_bw_layer. > > BUG=skia:3532 > > Committed: https://skia.googlesource.com/skia/+/b97dafefe63ea0a1bbce8e8b209f4920983fb8b9 > > Committed: https://skia.googlesource.com/skia/+/f5f8518fe0bbd2703e4ffc1b11ad7b4312ff7641 > > Committed: https://skia.googlesource.com/skia/+/46112cf2a7c7307f1c9eebb5f881cbda15aa460c TBR=bsalomon@google.com,reed@chromium.org,senorblanco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3532 Review URL: https://codereview.chromium.org/1057693002
* Revert of Fix GLSL error on Android. (patchset #2 id:20001 of ↵Gravatar rmistry2015-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1053873002/) Reason for revert: Spoke to Stephan about this. Reverting because failing debug builds: https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/51 https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/54 Original issue's description: > Fix GLSL error on Android. > > BUG=skia: > TBR=bsalomon > NOTREECHECKS=true > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/f90cd8e0e39af02c3826c80366efa3c06e88f642 TBR=bsalomon@google.com,senorblanco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1056713002