platform/upstream/libSkiaSharp.git
8 years agoRespect SkPictureRecorder::kPlaybackDrawPicture_RecordFlag for SkDrawables
djsollen [Tue, 17 Nov 2015 14:18:31 +0000 (06:18 -0800)]
Respect SkPictureRecorder::kPlaybackDrawPicture_RecordFlag for SkDrawables

Review URL: https://codereview.chromium.org/1452193002

8 years agoRevert of Enable temporarily disabled GpuDrawPathTest (patchset #1 id:1 of https...
caryclark [Tue, 17 Nov 2015 12:28:15 +0000 (04:28 -0800)]
Revert of Enable temporarily disabled GpuDrawPathTest (patchset #1 id:1 of https://codereview.chromium.org/1447973002/ )

Reason for revert:
broke windows builds

Original issue's description:
> Enable temporarily disabled GpuDrawPathTest
>
> Enable temporarily disabled GpuDrawPathTest.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d6346290c2ef59abee453a72f3e91b4e7b62f4fa

TBR=jvanverth@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1456463003

8 years agoEnable temporarily disabled GpuDrawPathTest
kkinnunen [Tue, 17 Nov 2015 06:12:39 +0000 (22:12 -0800)]
Enable temporarily disabled GpuDrawPathTest

Enable temporarily disabled GpuDrawPathTest.

BUG=skia:

Review URL: https://codereview.chromium.org/1447973002

8 years agoadd caps option 'k' to FatBits
reed [Tue, 17 Nov 2015 02:57:18 +0000 (18:57 -0800)]
add caps option 'k' to FatBits

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1452973002

8 years agoDe-spam SkOpts.cpp
mtklein [Tue, 17 Nov 2015 01:28:55 +0000 (17:28 -0800)]
De-spam SkOpts.cpp

  - stop printing when we detect sse4.2 and avx2
  - that TODO is pretty well done

BUG=skia:

Review URL: https://codereview.chromium.org/1445343002

8 years agoupdate iOS build flags
mtklein [Tue, 17 Nov 2015 00:20:34 +0000 (16:20 -0800)]
update iOS build flags

This makes it match OS X build more closely.
The most important change is that CLANG_CXX_LIBRARY sets -stdlib=libc++
for both the compiler and the linker.

BUG=skia:

Review URL: https://codereview.chromium.org/1451913002

8 years ago__vectorcall needs SSE
mtklein [Tue, 17 Nov 2015 00:20:29 +0000 (16:20 -0800)]
__vectorcall needs SSE

We don't have builders in this mode, but Mozilla does.

BUG=skia:4563

TBR=reed@google.com
No public API changes.

Review URL: https://codereview.chromium.org/1445283002

8 years agoMake SkAndroidCodec support wbmp
msarett [Mon, 16 Nov 2015 21:43:40 +0000 (13:43 -0800)]
Make SkAndroidCodec support wbmp

BUG=skia:

Review URL: https://codereview.chromium.org/1445643002

8 years agoruns some sample animations side by side in canvas and svg
caryclark [Mon, 16 Nov 2015 21:36:08 +0000 (13:36 -0800)]
runs some sample animations side by side in canvas and svg

TBR=fmalita@chromium.org

Review URL: https://codereview.chromium.org/1342523002

8 years agoOnly support jpeg, png, and webp for BRD
msarett [Mon, 16 Nov 2015 21:30:20 +0000 (13:30 -0800)]
Only support jpeg, png, and webp for BRD

This a safety check to ensure that we don't accidentally ship subset
decoders for non-required formats.

BUG=skia:

Review URL: https://codereview.chromium.org/1446543002

8 years agoincrease pre-allocated MCRecs to match common android calling pattern
reed [Mon, 16 Nov 2015 21:22:24 +0000 (13:22 -0800)]
increase pre-allocated MCRecs to match common android calling pattern

BUG=skia:

Review URL: https://codereview.chromium.org/1450093002

8 years agoRevert of skstd -> std for unique_ptr (patchset #9 id:160001 of https://codereview...
mtklein [Mon, 16 Nov 2015 21:05:37 +0000 (13:05 -0800)]
Revert of skstd -> std for unique_ptr (patchset #9 id:160001 of https://codereview.chromium.org/1436033003/ )

Reason for revert:
10.9 bots are too old too.

Original issue's description:
> skstd -> std for unique_ptr
>
> TBR=reed@google.com
> No public API changes.
>
> BUG=skia:4564
>
> Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50

TBR=bungeman@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4564

Review URL: https://codereview.chromium.org/1446413002

8 years agoskstd -> std for unique_ptr
mtklein [Mon, 16 Nov 2015 20:57:52 +0000 (12:57 -0800)]
skstd -> std for unique_ptr

TBR=reed@google.com
No public API changes.

BUG=skia:4564

Review URL: https://codereview.chromium.org/1436033003

8 years agoSwitch uses of SkChecksum::Compute to Murmur3.
mtklein [Mon, 16 Nov 2015 19:16:23 +0000 (11:16 -0800)]
Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac

Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba

Review URL: https://codereview.chromium.org/1436973003

8 years agoOptionally pass rendertarget to getTestTarget
robertphillips [Mon, 16 Nov 2015 19:02:05 +0000 (11:02 -0800)]
Optionally pass rendertarget to getTestTarget

This shouldn't really make any difference but allocating and holding on to a GrRenderTarget for each test target generates image differences for Mali GPUs. This CL allows an existing render target to be used for the test target.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1447113002

8 years agoRevert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of...
mtklein [Mon, 16 Nov 2015 19:01:18 +0000 (11:01 -0800)]
Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of https://codereview.chromium.org/1436973003/ )

Reason for revert:
gotta put back *compute = 0.

Original issue's description:
> Switch uses of SkChecksum::Compute to Murmur3.
>
> SkChecksum::Compute is a very, very poorly distributed hash function.
> This replaces all remaining uses with Murmur3.
>
> The only interesting stuff is in src/gpu.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac
>
> Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba

TBR=bsalomon@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1448023005

8 years agoSkPDF: fix large-number bug
halcanary [Mon, 16 Nov 2015 18:51:21 +0000 (10:51 -0800)]
SkPDF: fix large-number bug

Example:
        https://fiddle.skia.org/c/db95a3f6c928017635c4f4ddf25f2a7b

BUG=skia:257

Review URL: https://codereview.chromium.org/1438503002

8 years agoSwitch uses of SkChecksum::Compute to Murmur3.
mtklein [Mon, 16 Nov 2015 17:08:21 +0000 (09:08 -0800)]
Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac

Review URL: https://codereview.chromium.org/1436973003

8 years agoIncrease the amount of debug information printed out by batches
robertphillips [Mon, 16 Nov 2015 17:06:59 +0000 (09:06 -0800)]
Increase the amount of debug information printed out by batches

Untangling MDB bugs requires more information. In particular the render targets.

BUG=skia:4094
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1443763002

8 years agoDisable incomplete image tests in nanobench
msarett [Mon, 16 Nov 2015 16:43:23 +0000 (08:43 -0800)]
Disable incomplete image tests in nanobench

BUG=skia:

Review URL: https://codereview.chromium.org/1448893003

8 years agoFix for chrome's skia gl bindings code.
bsalomon [Mon, 16 Nov 2015 16:28:21 +0000 (08:28 -0800)]
Fix for chrome's skia gl bindings code.

TBR=egdaniel@google.com
NOTRY=true

Review URL: https://codereview.chromium.org/1451743002

8 years agoDocumentation: Further cleanup
halcanary [Mon, 16 Nov 2015 15:37:23 +0000 (07:37 -0800)]
Documentation:  Further cleanup

*   /user/download: remove instruction to compile and run skia
    tests - moved to /user/quick/${OS}

*   /user/quick/desktop: move Gyp options to a section in the
    FAQ (distracts from quick start narritive).

*   /user/tips: reformat, rewrite.

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1443653002

Review URL: https://codereview.chromium.org/1443653002

8 years agoAdd support for EGLImage to GrGLInterface
bsalomon [Mon, 16 Nov 2015 14:48:44 +0000 (06:48 -0800)]
Add support for EGLImage to GrGLInterface

BUG=skia:

Review URL: https://codereview.chromium.org/1434813002

8 years agoUpdate testing frameworks/tests for MDB
robertphillips [Mon, 16 Nov 2015 14:23:31 +0000 (06:23 -0800)]
Update testing frameworks/tests for MDB

This CL:

Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
Updates the ProgramUnitTest to use multiple drawTargets
Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)

BUG=skia:4094

Committed: https://skia.googlesource.com/skia/+/9c8605144a0f15e3e69a4e1dcd5d3e63f339380e

Review URL: https://codereview.chromium.org/1441533003

8 years agoUpdate SKP version
update-skps [Mon, 16 Nov 2015 13:20:53 +0000 (05:20 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1446043002

8 years agoRevert of Update testing frameworks/tests for MDB (patchset #4 id:60001 of https...
egdaniel [Fri, 13 Nov 2015 21:42:55 +0000 (13:42 -0800)]
Revert of Update testing frameworks/tests for MDB (patchset #4 id:60001 of https://codereview.chromium.org/1441533003/ )

Reason for revert:
Speculative revert for leaks based on ASAN bot (and some local valgrind testing)

Original issue's description:
> Update testing frameworks/tests for MDB
>
> This CL:
>
> Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
> Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
> Updates the ProgramUnitTest to use multiple drawTargets
> Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)
>
> BUG=skia:4094
>
> Committed: https://skia.googlesource.com/skia/+/9c8605144a0f15e3e69a4e1dcd5d3e63f339380e

TBR=joshualitt@chromium.org,joshualitt@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4094

Review URL: https://codereview.chromium.org/1450513002

8 years agoFix BUILD.public INCLUDES after https://codereview.chromium.org/1438873002
benjaminwagner [Fri, 13 Nov 2015 20:27:08 +0000 (12:27 -0800)]
Fix BUILD.public INCLUDES after https://codereview.chromium.org/1438873002

BUG=skia:

Review URL: https://codereview.chromium.org/1445463003

8 years agoRename some processor functions from GL to GLSL
egdaniel [Fri, 13 Nov 2015 19:57:27 +0000 (11:57 -0800)]
Rename some processor functions from GL to GLSL

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1443743002

8 years agoCreate a standalone example for using Skia with SDL
joshualitt [Fri, 13 Nov 2015 19:22:19 +0000 (11:22 -0800)]
Create a standalone example for using Skia with SDL

BUG=skia:

Review URL: https://codereview.chromium.org/1442573003

8 years agoturn on libc++ for iOS
mtklein [Fri, 13 Nov 2015 19:22:04 +0000 (11:22 -0800)]
turn on libc++ for iOS

BUG=skia:

Review URL: https://codereview.chromium.org/1442103002

8 years agoRemove dependency on src/android from dm and nanobench
msarett [Fri, 13 Nov 2015 17:59:11 +0000 (09:59 -0800)]
Remove dependency on src/android from dm and nanobench

BUG=skia:

Review URL: https://codereview.chromium.org/1443033002

8 years agoMove GrGLPrimitive/GeometryProc to GLSL
egdaniel [Fri, 13 Nov 2015 17:55:43 +0000 (09:55 -0800)]
Move GrGLPrimitive/GeometryProc to GLSL

BUG=skia:

Review URL: https://codereview.chromium.org/1441683008

8 years agoAdd visualbench option for nvpr stencil samples
cdalton [Fri, 13 Nov 2015 17:10:31 +0000 (09:10 -0800)]
Add visualbench option for nvpr stencil samples

Repurposes the --nvpr flag as an int that says how many stencil samples
to use, or disables nvpr with a value of zero.

BUG=skia:

Review URL: https://codereview.chromium.org/1444543002

8 years agoFix visualbench flicker on triple buffered platforms
cdalton [Fri, 13 Nov 2015 16:56:31 +0000 (08:56 -0800)]
Fix visualbench flicker on triple buffered platforms

BUG=skia:

Review URL: https://codereview.chromium.org/1441073005

8 years agoMake visualbench timing continuous for no-reset mode
cdalton [Fri, 13 Nov 2015 16:42:06 +0000 (08:42 -0800)]
Make visualbench timing continuous for no-reset mode

Ensures there is no period of time that is not on the clock when not
restting the graphics context between samples.

BUG=skia:

Review URL: https://codereview.chromium.org/1444473003

8 years agoMove XferProcessors to glsl
egdaniel [Fri, 13 Nov 2015 16:34:52 +0000 (08:34 -0800)]
Move XferProcessors to glsl

This is basically a move and rename

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1440073002

8 years agoAdd visualbench option to not reset between samples
cdalton [Fri, 13 Nov 2015 16:28:49 +0000 (08:28 -0800)]
Add visualbench option to not reset between samples

Adds a --reset flag that controls whether we teardown the graphics
context between samples. Also modifies the timing algorithm to always/
only pre-warm after resetting the context.

BUG=skia:

Review URL: https://codereview.chromium.org/1442643007

8 years agoExclude src/android from CMake build too.
mtklein [Fri, 13 Nov 2015 15:42:26 +0000 (07:42 -0800)]
Exclude src/android from CMake build too.

It requires src/codec.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1438123008

8 years agoRevert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of...
mtklein [Fri, 13 Nov 2015 15:07:47 +0000 (07:07 -0800)]
Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of https://codereview.chromium.org/1436973003/ )

Reason for revert:
I would not have expected this to change any images.

Looks like it's changed both MSAA and non-MSAA GMs:
https://gold.skia.org/search2?blame=1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac&unt=true&head=true&query=source_type%3Dgm

Original issue's description:
> Switch uses of SkChecksum::Compute to Murmur3.
>
> SkChecksum::Compute is a very, very poorly distributed hash function.
> This replaces all remaining uses with Murmur3.
>
> The only interesting stuff is in src/gpu.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac

TBR=bsalomon@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1445523003

8 years agoMake all GrFragmentProcessors GL independent.
egdaniel [Fri, 13 Nov 2015 14:54:19 +0000 (06:54 -0800)]
Make all GrFragmentProcessors GL independent.

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1434313002

8 years agoaugment gradients_many to exercise flipped gradients and clampping
reed [Fri, 13 Nov 2015 14:23:54 +0000 (06:23 -0800)]
augment gradients_many to exercise flipped gradients and clampping

BUG=skia:
TBR=
NOTREECHECKS=True

Review URL: https://codereview.chromium.org/1442833004

8 years agoMove SkBitmapRegionDecoder to include/android and src/android
msarett [Fri, 13 Nov 2015 14:11:09 +0000 (06:11 -0800)]
Move SkBitmapRegionDecoder to include/android and src/android

This will expose the BitmapRegionDecoder API as a public include
and move the implementation to src.

This makes this code more naturally exposed in Android and easier
to test in DM and nanobench.

BUG=skia:

Review URL: https://codereview.chromium.org/1438873002

8 years agoUpdate testing frameworks/tests for MDB
robertphillips [Fri, 13 Nov 2015 14:06:03 +0000 (06:06 -0800)]
Update testing frameworks/tests for MDB

This CL:

Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
Updates the ProgramUnitTest to use multiple drawTargets
Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)

BUG=skia:4094

Review URL: https://codereview.chromium.org/1441533003

8 years agoLock pixels again after dummy reset of pixel ref in SkBitmapRegionCodec
msarett [Fri, 13 Nov 2015 13:56:27 +0000 (05:56 -0800)]
Lock pixels again after dummy reset of pixel ref in SkBitmapRegionCodec

This fixes a bug in Android.  We cannot access the pixels after
calling decodeRegion() because the call to lock is missing.

BUG=skia:

Review URL: https://codereview.chromium.org/1442553003

8 years agoDocumentation: clean up
halcanary [Fri, 13 Nov 2015 12:29:59 +0000 (04:29 -0800)]
Documentation: clean up

-   /user/quick/desktop to bring together all common information for
    using Skia on desktop OSes.  Remove duplication.

-   Replace all instances of call ing gyp_skia directly with calling
    `python bin/sync-and-gyp`.  This is more correct on Windows

-   Remove outdated linux prerequisite packages

-   Formatting, formatting, formatting.

-   Note command-line syntax differences in Windows

-   SampleApp.app is no longer a bundle on MacOS

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1439493003

Review URL: https://codereview.chromium.org/1439493003

8 years agoSwitch uses of SkChecksum::Compute to Murmur3.
mtklein [Thu, 12 Nov 2015 23:44:09 +0000 (15:44 -0800)]
Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

Review URL: https://codereview.chromium.org/1436973003

8 years agoFix GrCoverageSetOpXP unit test on mixed samples
cdalton [Thu, 12 Nov 2015 20:11:04 +0000 (12:11 -0800)]
Fix GrCoverageSetOpXP unit test on mixed samples

Updates GrCoverageSetOpXPFactory::TestCreate to not invert coverage
with mixed samples, which is an unsupported configuration.

TBR=bsalomon@google.com

BUG=skia:4556

Review URL: https://codereview.chromium.org/1442763002

8 years agoSkAtomic: always use std::atomic
mtklein [Thu, 12 Nov 2015 19:07:53 +0000 (11:07 -0800)]
SkAtomic: always use std::atomic

We were doing it on Windows, now do it everywhere.
This just changes the backend.  We could think about another step to actually
replacing all our sk_atomic_... with std atomic stuff.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot
TBR=reed@google.com
Only deleting from include/...

Review URL: https://codereview.chromium.org/1441773002

8 years agoReplace SkFunction with std::function
mtklein [Thu, 12 Nov 2015 18:41:05 +0000 (10:41 -0800)]
Replace SkFunction with std::function

TBR=reed@google.com
No public API changes.

Review URL: https://codereview.chromium.org/1441753002

8 years agoAPI changes to GrTextureAdjuster.
bsalomon [Thu, 12 Nov 2015 17:59:44 +0000 (09:59 -0800)]
API changes to GrTextureAdjuster.

These changes are to facilitate converting SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer.

Make constraint rect relative to content area

Store dimensions in GrTextureProducer

Make originalTexture() protected.

Remove getContentArea()

Provide pre-normalized texture matrix to GrTextureAdjuster::createFragmentProcessor. Define it to be be relative to content area.

Review URL: https://codereview.chromium.org/1438663004

8 years agoFactor CSS3 matching rules.
bungeman [Thu, 12 Nov 2015 17:50:08 +0000 (09:50 -0800)]
Factor CSS3 matching rules.

This factors out the CSS3 matching rules, creates tests for it,
and uses it with the GDI font manager.

BUG=chromium:554238,skia:4037

TBR=reed@google.com
No public API changes.

Review URL: https://codereview.chromium.org/1438113002

8 years agoFix mixed sampled inverse path fills
cdalton [Thu, 12 Nov 2015 17:18:49 +0000 (09:18 -0800)]
Fix mixed sampled inverse path fills

Fixes a double blend that was occurring down the diagonals of inverse
path fills when using mixed samples.

BUG=skia:

Review URL: https://codereview.chromium.org/1442513002

8 years agoIncrement text pointer when the width is zero in the subpixel with center and right...
herb [Thu, 12 Nov 2015 16:53:42 +0000 (08:53 -0800)]
Increment text pointer when the width is zero in the subpixel with center and right alignment.

BUG=skia:

Review URL: https://codereview.chromium.org/1438893002

8 years agoTarget Mac bots at 10.7+libc++ to approximate Chrome's 10.6+libc++.
mtklein [Thu, 12 Nov 2015 16:41:40 +0000 (08:41 -0800)]
Target Mac bots at 10.7+libc++ to approximate Chrome's 10.6+libc++.

This is necessary if we want to start using C++11 library features.

Chrome's got their own custom libc++-for-10.6.
This is a somewhat lazy approximation of that.

Chrome should still guard us from using 10.7-specific features
until 10.6-10.8 all go away.

BUG=skia:

Review URL: https://codereview.chromium.org/1437173002

8 years agoAdd include guards for SkBRDAllocator
scroggo [Thu, 12 Nov 2015 06:54:24 +0000 (22:54 -0800)]
Add include guards for SkBRDAllocator

One step towards fixing the master-skia build

Review URL: https://codereview.chromium.org/1440883002

8 years agoIn SkGpuDevice;drawTextureAdjuster perform texture w\h divide in texture matrix
bsalomon [Thu, 12 Nov 2015 00:52:03 +0000 (16:52 -0800)]
In SkGpuDevice;drawTextureAdjuster perform texture w\h divide in texture matrix

Review URL: https://codereview.chromium.org/1440763002

8 years agoEnable AA stencil clip for mixed samples
cdalton [Wed, 11 Nov 2015 23:27:57 +0000 (15:27 -0800)]
Enable AA stencil clip for mixed samples

Updates GrClipMaskManager to use the stencil buffer when the RT is
mixed sampled.

BUG=skia:

Review URL: https://codereview.chromium.org/1440513002

8 years agoRevert of Enable stencil clipping in mixed sampled render targets (patchset #6 id...
cdalton [Wed, 11 Nov 2015 23:16:07 +0000 (15:16 -0800)]
Revert of Enable stencil clipping in mixed sampled render targets (patchset #6 id:100001 of https://codereview.chromium.org/1232103002/ )

Reason for revert:
Co-centered sample locations are not needed to do stencil clip with mixed samples

Original issue's description:
> Implement stencil clipping in mixed sampled render targets
>
> This change enables multisampled clipping for mixed sampled
> render targets.  Previously clipping in mixed samples config
> behaved the same as in the gpu config.
>
> In order to retrofit non-MSAA draw methods, programmable sample
> locations are used in order to colocate all samples at (0.5, 0.5).
> Requires support for NV_sample_locations.
>
> BUG=skia:4399
>
> Committed:
> https://skia.googlesource.com/skia/+/3e77ba96d56d15db30ac6d8ccb900e30aafcbb16

BUG=skia:

Review URL: https://codereview.chromium.org/1415873011

8 years agoRevert of Fix setColocatedSampleLocations on ES and GL < 4.5 (patchset #2 id:20001...
cdalton [Wed, 11 Nov 2015 23:03:45 +0000 (15:03 -0800)]
Revert of Fix setColocatedSampleLocations on ES and GL < 4.5 (patchset #2 id:20001 of https://codereview.chromium.org/1415503008/ )

Reason for revert:
Co-centered sample locations are not needed to do stencil clip with mixed samples.

Original issue's description:
> Fix setColocatedSampleLocations on ES and GL < 4.5
>
> Updates setColocatedSampleLocations to use glFramebufferParameteri
> when
> the DSA version glNamedFramebufferParameteri is not present.
>
> BUG=skia:
>
> Committed:
> https://skia.googlesource.com/skia/+/98cad6219b430eddf5528473311279f21dbd2e10

BUG=skia:

Review URL: https://codereview.chromium.org/1420883007

8 years agoMake BRD take advantage of zero initialized memory
msarett [Wed, 11 Nov 2015 21:30:43 +0000 (13:30 -0800)]
Make BRD take advantage of zero initialized memory

This is the third step in a three part change:
(1) Skia: Add SkBRDAllocator.
(2) Android: Make JavaPixelAllocator and RecyclingClippingPixelAllocator
             implement SkBRDAllocator.
(3) Skia: Change SkBitmapRegionDecoder to use SkBRDAllocator and take
          advantage of zero allocated memory when possible.

BUG=skia:

Review URL: https://codereview.chromium.org/1420053010

8 years agoReadd "immediate" mode
robertphillips [Wed, 11 Nov 2015 21:18:11 +0000 (13:18 -0800)]
Readd "immediate" mode

This isn't an exact replacement. The accumulated batches are now flushed at drawContext-entry-point granularity (via the AutoCheckFlush objects) rather than per batch.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1439533003

8 years agobring up SDL on windows
joshualitt [Wed, 11 Nov 2015 21:17:06 +0000 (13:17 -0800)]
bring up SDL on windows

BUG=skia:

patch from issue 1432353002 at patchset 1 (http://crrev.com/1432353002#ps1)

Review URL: https://codereview.chromium.org/1438003004

8 years agoMove all ShaderBuilder files to GLSL
egdaniel [Wed, 11 Nov 2015 21:06:05 +0000 (13:06 -0800)]
Move all ShaderBuilder files to GLSL

BUG=skia:

Review URL: https://codereview.chromium.org/1438003003

8 years agoFix -Wunused-parameter errors in SkCodec.h in Android
msarett [Wed, 11 Nov 2015 20:43:07 +0000 (12:43 -0800)]
Fix -Wunused-parameter errors in SkCodec.h in Android

BUG=skia:

Review URL: https://codereview.chromium.org/1437823004

8 years agoFix leaks in unit tests of GrGLTextureInfos
bsalomon [Wed, 11 Nov 2015 20:40:42 +0000 (12:40 -0800)]
Fix leaks in unit tests of GrGLTextureInfos

TBR=egdaniel@google.com

Review URL: https://codereview.chromium.org/1433353005

8 years agoMove GrBatchFlushState from GrDrawTarget to GrDrawingManager
robertphillips [Wed, 11 Nov 2015 20:01:09 +0000 (12:01 -0800)]
Move GrBatchFlushState from GrDrawTarget to GrDrawingManager

This CL:
  moves the flushState
  disables immediate mode (it was proving difficult to implement)
  also moves the program unit test to the drawing manager

BUG=skia:4094
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1437843002

8 years agofloat xfermodes (burn, dodge, softlight) in Sk8f, possibly using AVX.
mtklein [Wed, 11 Nov 2015 19:39:09 +0000 (11:39 -0800)]
float xfermodes (burn, dodge, softlight) in Sk8f, possibly using AVX.

Xfermode_ColorDodge_aa 10.3ms -> 7.85ms 0.76x
 Xfermode_SoftLight_aa 13.8ms -> 10.2ms 0.74x
 Xfermode_ColorBurn_aa 10.7ms -> 7.82ms 0.73x
    Xfermode_SoftLight 33.6ms -> 23.2ms 0.69x
   Xfermode_ColorDodge   25ms -> 16.5ms 0.66x
    Xfermode_ColorBurn 26.1ms -> 16.6ms 0.63x

Ought to be no pixel diffs:
https://gold.skia.org/search2?issue=1432903002&unt=true&query=source_type%3Dgm&master=false

Incidental stuff:

I made the SkNx(T) constructors implicit to make writing math expressions simpler.
This allows us to write expressions like
  Sk4f v;
  ...
  v = v*4;
rather than
  Sk4f v;
  ...
  v = v * Sk4f(4);

As written it only works when the constant is on the right-hand side,
so expressions like `(Sk4f(1) - da)` have to stay for now.  I plan on
following up with a CL that lets those become `(1 - da)` too.

BUG=skia:4117
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1432903002

8 years agoReplace glyph find and position with common code for the gpu bitmap case.
herb [Wed, 11 Nov 2015 19:30:11 +0000 (11:30 -0800)]
Replace glyph find and position with common code for the gpu bitmap case.

BUG=skia:

Review URL: https://codereview.chromium.org/1424173005

8 years agoFix code that left shifts a negative value. This has undefined behavior.
benjaminwagner [Wed, 11 Nov 2015 16:46:34 +0000 (08:46 -0800)]
Fix code that left shifts a negative value.  This has undefined behavior.

Patched from internal cl/107515669 by rtrieu and added comments.

BUG=skia:2481

Review URL: https://codereview.chromium.org/1439483002

8 years agoChange quality settings on SkImageDecoder_libjpeg
msarett [Wed, 11 Nov 2015 14:41:01 +0000 (06:41 -0800)]
Change quality settings on SkImageDecoder_libjpeg

It has been demonstrated that higher quality settings
really do make a difference in the visual quality of
the output image.
https://code.google.com/p/chromium/issues/detail?id=385515
https://code.google.com/p/skia/issues/detail?id=3770

We are planning to replace SkImageDecoder with SkCodec,
and SkCodec will use the higher quality settings.  As
a first step, we are using SkCodec as the underlying
implementation for BitmapRegionDecoder.  CTS tests require
that BitmapRegionDecoder be a close match to BitmapFactory
(which uses SkImageDecoder), so we must also update the
quality of SkImageDecoder to maintain CTS compatibility.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/69ad6a9d03dd6f14b7c730465319313725a7c903

Review URL: https://codereview.chromium.org/1412803009

8 years agoMake GrGLSLProgramBuilder base class for GrGLProgramBuilder.
egdaniel [Wed, 11 Nov 2015 14:27:20 +0000 (06:27 -0800)]
Make GrGLSLProgramBuilder base class for GrGLProgramBuilder.

This CL still keeps the weird diamond shape we have for all our ProgramBuilders.
However, the GrGLSL base class will allow us to pull multiple other parts
of our program setup away from GL which will eventually allow us to break up
the diamond.

As part of this all ShaderBuilder subclass have been made gl independent,
however I will move them to GLSL files/class names in a follow on CL.

BUG=skia:

Review URL: https://codereview.chromium.org/1416423003

8 years agoAdd an Allocator interface that indicates if memory is zero init
msarett [Wed, 11 Nov 2015 14:21:27 +0000 (06:21 -0800)]
Add an Allocator interface that indicates if memory is zero init

This is the first step in a three part change:
(1) Skia: Add SkBRDAllocator.
(2) Android: Make JavaPixelAllocator and RecyclingClippingPixelAllocator
             implement SkBRDAllocator.
(3) Skia: Change SkBitmapRegionDecoder to use SkBRDAllocator and take
          advantage of zero allocated memory when possible.

BUG=skia:

Review URL: https://codereview.chromium.org/1423253004

8 years agoReorganize BRD code in new tools directory
msarett [Tue, 10 Nov 2015 23:49:46 +0000 (15:49 -0800)]
Reorganize BRD code in new tools directory

Rename SkCodecTools.h to SkBitmapRegionDecoderPriv.h

Move BRD code to its own directory in tools.  This
allows us to not need to expose the entire tools
directory in Android.

BUG=skia:

Review URL: https://codereview.chromium.org/1417393004

8 years agoDelete dead SkImageDecoder::buildTileIndex and decodeSubset code
msarett [Tue, 10 Nov 2015 23:38:23 +0000 (15:38 -0800)]
Delete dead SkImageDecoder::buildTileIndex and decodeSubset code

This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1426943009

8 years agoDelete dead BitmapRegionDecoder code in tools
msarett [Tue, 10 Nov 2015 23:24:10 +0000 (15:24 -0800)]
Delete dead BitmapRegionDecoder code in tools

This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1406033007

8 years agoDelete dead subset test code from dm
msarett [Tue, 10 Nov 2015 23:09:03 +0000 (15:09 -0800)]
Delete dead subset test code from dm

This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1416673010

8 years agoDelete dead subset benches from nanobench
msarett [Tue, 10 Nov 2015 22:52:13 +0000 (14:52 -0800)]
Delete dead subset benches from nanobench

This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1430493005

8 years agoMissing resources crash SampleFilterQuality.
bungeman [Tue, 10 Nov 2015 21:29:43 +0000 (13:29 -0800)]
Missing resources crash SampleFilterQuality.

The FilterQuality slide segfaults if resources cannot be loaded.
This is particularly noticeable with an Android build, as by
default resources are not available.

Review URL: https://codereview.chromium.org/1422763004

8 years agoRevert of Fix mixed samples stencil clip (patchset #5 id:80001 of https://codereview...
cdalton [Tue, 10 Nov 2015 20:49:06 +0000 (12:49 -0800)]
Revert of Fix mixed samples stencil clip (patchset #5 id:80001 of https://codereview.chromium.org/1431593006/ )

Reason for revert:
Co-centered sample locations are not needed to do stencil clip with mixed samples.

Original issue's description:
> Fix mixed samples stencil clip
>
> Fixes rendering bugs and nondeterminism in gm.
>
> Before, mixed samples stencil clip would try to infer whether the draw
> wanted co-centered sample locations from within GrGLGpu, which caused
> various errors. This change reworks it so the draw itself can request
> the co-centered sample locations when it knows it will need them.
>
> Also reduces framebuffer binds by moving the code that enables
> GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS into flushRenderTarget.
>
> Committed: https://skia.googlesource.com/skia/+/14184d5567b58085b6d8a6375796d405056f7f73

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1407063011

8 years agoUse a struct for client GL texture handles
bsalomon [Tue, 10 Nov 2015 19:54:56 +0000 (11:54 -0800)]
Use a struct for client GL texture handles

Review URL: https://codereview.chromium.org/1429863009

8 years agoReduce messages from libjpeg-turbo
msarett [Tue, 10 Nov 2015 19:22:12 +0000 (11:22 -0800)]
Reduce messages from libjpeg-turbo

output_message():
By overriding output_message, we can use SkCodecPrintf,
which we can turn on or off.

The default turbo implementation of emit_message calls
output_message when it wants to print a message, so,
even though we don't override emit_message, it also uses
SkCodecPrintf.

emit_message():
Use libjpeg-turbo’s default implementation of emit_message.

It does not print "trace messages" which essentially are info
messages and it only prints the first warning (unless it a very
serious warning).

Currently, we just print everything, which is why the output
has been so verbose.

BUG=skia:

Review URL: https://codereview.chromium.org/1427523007

8 years agoGYP: remove stale skia_scalar gyp variable
Hal Canary [Tue, 10 Nov 2015 18:25:12 +0000 (13:25 -0500)]
GYP: remove stale skia_scalar gyp variable
DOCS_PREVIEW= https://skia.org/?cl=1417703013

Review URL: https://codereview.chromium.org/1417703013 .

8 years agoDisable preemptive batch preparation
robertphillips [Tue, 10 Nov 2015 18:19:50 +0000 (10:19 -0800)]
Disable preemptive batch preparation

Preemptive batch preparation makes MultiDrawBuffer more difficult to implement. This CL disables it.

BUG=skia:4094

Review URL: https://codereview.chromium.org/1430403002

8 years agoSkPDF: Deal with missing ColorTable (don't assert)
halcanary [Tue, 10 Nov 2015 17:48:40 +0000 (09:48 -0800)]
SkPDF: Deal with missing ColorTable (don't assert)

Review URL: https://codereview.chromium.org/1414083005

8 years agoFix reversion to bilerp on clipped mipmap draws
bsalomon [Tue, 10 Nov 2015 17:18:32 +0000 (09:18 -0800)]
Fix reversion to bilerp on clipped mipmap draws

Review URL: https://codereview.chromium.org/1437573004

8 years agoParse command line arguments for sdl + android
joshualitt [Tue, 10 Nov 2015 16:27:22 +0000 (08:27 -0800)]
Parse command line arguments for sdl + android

TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/1432983002

8 years agoFixes for building with sdl on android
joshualitt [Tue, 10 Nov 2015 15:36:18 +0000 (07:36 -0800)]
Fixes for building with sdl on android

BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1437613002

8 years agoMake SkBlurImageFilter capable of cropping during blur (GPU path).
senorblanco [Tue, 10 Nov 2015 15:32:37 +0000 (07:32 -0800)]
Make SkBlurImageFilter capable of cropping during blur (GPU path).

This is the GPU equivalent of https://codereview.chromium.org/1415653003/.

It requires passing down the bounds of the crop rect (srcBounds), and
turning the blur 3-patch optimization in convolve_gaussian() into a 5-patch:
clear above and below srcBounds, blur with bounds checks inside left and
right rects, blur without bounds checks in middle rect.

Note: this change causes minor pixels diffs in the
imagefilterscropexpand GM: for odd crop positions relative to the
dstBounds, we are now correctly resampling at an even pixel boundary.

BUG=skia:4502, skia:4526

Committed: https://skia.googlesource.com/skia/+/c57e0ded7d535523cfc6bf07c78e5f3479bb8c42

Review URL: https://codereview.chromium.org/1431593002

8 years agoSkResourceCache::GetAllocator() index8 and other color types handling
aleksandar.stojiljkovic [Tue, 10 Nov 2015 12:55:15 +0000 (04:55 -0800)]
SkResourceCache::GetAllocator() index8 and other color types handling

Unit tests added to check all color types in SkOneShotDiscardablePixelref

SkResourceCacheTest seems to have been allways using default Heap Allocator.
 Fixed so that it uses private (not global that is) SkDiscardableMemory.

BUG=skia:4355

Review URL: https://codereview.chromium.org/1426753006

8 years agoapply mozilla patch
reed [Tue, 10 Nov 2015 12:55:08 +0000 (04:55 -0800)]
apply mozilla patch

BUG=skia:4547

Review URL: https://codereview.chromium.org/1421793009

8 years agoFix mixed samples stencil clip
cdalton [Mon, 9 Nov 2015 23:12:19 +0000 (15:12 -0800)]
Fix mixed samples stencil clip

Fixes rendering bugs and nondeterminism in gm.

Before, mixed samples stencil clip would try to infer whether the draw
wanted co-centered sample locations from within GrGLGpu, which caused
various errors. This change reworks it so the draw itself can request
the co-centered sample locations when it knows it will need them.

Also reduces framebuffer binds by moving the code that enables
GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS into flushRenderTarget.

Review URL: https://codereview.chromium.org/1431593006

8 years agoUpdate Layer Hoisting to store its atlas texture in the resource cache
robertphillips [Mon, 9 Nov 2015 21:51:06 +0000 (13:51 -0800)]
Update Layer Hoisting to store its atlas texture in the resource cache

BUG=skia:4346

Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368

Review URL: https://codereview.chromium.org/1406013006

8 years agoExtract glyph find and position code in preparation to use it in XPS and GPU code.
herb [Mon, 9 Nov 2015 21:15:21 +0000 (13:15 -0800)]
Extract glyph find and position code in preparation to use it in XPS and GPU code.

BUG=skia:

Review URL: https://codereview.chromium.org/1409123010

8 years agodemo tweaks, scale up perlin, add call to flush for fps
reed [Mon, 9 Nov 2015 21:10:30 +0000 (13:10 -0800)]
demo tweaks, scale up perlin, add call to flush for fps

BUG=skia:
TBR=bsalomon

Review URL: https://codereview.chromium.org/1419983006

8 years agoWire up SDL on mac
joshualitt [Mon, 9 Nov 2015 20:30:05 +0000 (12:30 -0800)]
Wire up SDL on mac

BUG=skia:

Review URL: https://codereview.chromium.org/1428633003

8 years agoSeparate out natively-texture image/bmp draws from cached-as-texture image/bmp draws
bsalomon [Mon, 9 Nov 2015 19:55:57 +0000 (11:55 -0800)]
Separate out natively-texture image/bmp draws from cached-as-texture image/bmp draws

This makes texture-backed images and bitmaps down a new code path. It adds a pinch point via the texture adjuster that will be used to handle copied necessary for different texture targets. It also fixes bugs in the existing code exhibited by recent updates to the bleed GM. The plan is to move the the sw/generator-backed imgs/bmps on to this code path with future changes.

Review URL: https://codereview.chromium.org/1424313010

8 years agoDocumentation - Remove references to `gclient sync`
halcanary [Mon, 9 Nov 2015 19:47:09 +0000 (11:47 -0800)]
Documentation - Remove references to `gclient sync`

skia.org/user/download
-   Move sections "Making changes" and "Uploading changes for review"
    to "How to submit a patch" page
-   Mention bin/sync-and-gyp

skia.org/dev/contrib/submit
-   Mention branch.autosetuprebase=always to fit with Skia's linear
    history style.

NOTRY=true
DOCS_PREVIEW= https://skia.org/user/download?cl=1411403010
DOCS_PREVIEW= https://skia.org/dev/contrib/submit?cl=1411403010

Review URL: https://codereview.chromium.org/1411403010

8 years agoFix compile error mac 10.8.
herb [Mon, 9 Nov 2015 18:49:29 +0000 (10:49 -0800)]
Fix compile error mac 10.8.

The mac 10.8 compiler seems to get the constructor wrong. Remove the SkNoCopy.

BUG=skia:4037

Review URL: https://codereview.chromium.org/1421863004

8 years agoRewrite bleed GM bmp/img generators and change oversized texture case
bsalomon [Mon, 9 Nov 2015 18:06:06 +0000 (10:06 -0800)]
Rewrite bleed GM bmp/img generators and change oversized texture case

Makes it so that the oversized-texture/bmp case doesn't run on the CPU and makes it so that the subrect rendered is adjacent to the texture pad area on the bottom/right edges.

Review URL: https://codereview.chromium.org/1424473006

8 years agoRevert of Make SkBlurImageFilter capable of cropping during blur (GPU path). (patchse...
egdaniel [Mon, 9 Nov 2015 18:04:20 +0000 (10:04 -0800)]
Revert of Make SkBlurImageFilter capable of cropping during blur (GPU path). (patchset #15 id:260001 of https://codereview.chromium.org/1431593002/ )

Reason for revert:
Causing valgrind error. Looks like the issue is in conolve_gaussiand_2d where bounds is not getting set if there is no srcBounds, but later on that bounds is being read in the creation of a TextureDomain.

Original issue's description:
> Make SkBlurImageFilter capable of cropping during blur (GPU path).
>
> This is the GPU equivalent of https://codereview.chromium.org/1415653003/.
>
> It requires passing down the bounds of the crop rect (srcBounds), and
> turning the blur 3-patch optimization in convolve_gaussian() into a 5-patch:
> clear above and below srcBounds, blur with bounds checks inside left and
> right rects, blur without bounds checks in middle rect.
>
> Note: this change causes minor pixels diffs in the
> imagefilterscropexpand GM: for odd crop positions relative to the
> dstBounds, we are now correctly resampling at an even pixel boundary.
>
> BUG=skia:4502, skia:4526
>
> Committed: https://skia.googlesource.com/skia/+/c57e0ded7d535523cfc6bf07c78e5f3479bb8c42

TBR=bsalomon@google.com,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4502, skia:4526

Review URL: https://codereview.chromium.org/1407133019