platform/upstream/libSkiaSharp.git
9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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 .

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 years agoSkPx: use namespaces as namespaces
mtklein [Mon, 9 Nov 2015 16:55:01 +0000 (08:55 -0800)]
SkPx: use namespaces as namespaces

This is a pure refactor.  No behavior change.
I'm just getting tired of typing out the names...

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/1436513002

9 years agoExtract the glyph picking and placing code.
herb [Mon, 9 Nov 2015 16:51:56 +0000 (08:51 -0800)]
Extract the glyph picking and placing code.

There is a common piece of code which finds and positions glyphs and is used in four places. Some places copied the code, some places added callbacks. Here is a list of code:

SkDraw::drawPosText
GrAtlasTextContext::internalDrawBMPPosText
GrAtlasTextContext::internalDrawDFPosText
SkXPSDevice::drawPosText

This only extracts the code from SkDraw::drawPosText. I would like to use it in the other three places. I think this code is performance neutral.

BUG=skia:

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

9 years agoRemove debug print statement
egdaniel [Mon, 9 Nov 2015 16:49:21 +0000 (08:49 -0800)]
Remove debug print statement

TBR=bsalomon@google.com

BUG=skia:

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

9 years agotweaks for nov demo
reed [Mon, 9 Nov 2015 16:36:05 +0000 (08:36 -0800)]
tweaks for nov demo

Add this flag to SampleApp, and it will run with the specified restricted sequence

    --sequence /skia/trunk/resources/nov-talk-sequence.txt

BUG=skia:
TBR=

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

9 years agoprune unused SkNx features
mtklein [Mon, 9 Nov 2015 16:33:53 +0000 (08:33 -0800)]
prune unused SkNx features

  - remove float -> int conversion, keeping float -> byte
  - remove support for doubles

I was thinking of specializing Sk8f for AVX.  This will help keep the complexity down.

This may cause minor diffs in radial gradients: toBytes() rounds where castTrunc() truncated.  But I don't see any diffs in Gold.
https://gold.skia.org/search2?issue=1411563008&unt=true&query=source_type%3Dgm&master=false

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/1411563008

9 years agobin/sync-and-gyp: sh->py (make more cross-platform)
halcanary [Mon, 9 Nov 2015 16:28:13 +0000 (08:28 -0800)]
bin/sync-and-gyp: sh->py (make more cross-platform)

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

9 years agoUpdate sample to use new perlin noise shader, and make cloud like
egdaniel [Mon, 9 Nov 2015 15:40:49 +0000 (07:40 -0800)]
Update sample to use new perlin noise shader, and make cloud like

BUG=skia:

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

9 years agosse 4.2 detection
mtklein [Mon, 9 Nov 2015 15:08:32 +0000 (07:08 -0800)]
sse 4.2 detection

While we're detecting instruction sets, let's fill in this hole too.

BUG=skia:

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

9 years agoadded experimental improved Perlin noise shader
ethannicholas [Mon, 9 Nov 2015 14:35:12 +0000 (06:35 -0800)]
added experimental improved Perlin noise shader

TBR=bsalomon@google.com

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

9 years agoRevert of Change quality settings on SkImageDecoder_libjpeg (patchset #1 id:40001...
fmalita [Mon, 9 Nov 2015 00:30:08 +0000 (16:30 -0800)]
Revert of Change quality settings on SkImageDecoder_libjpeg (patchset #1 id:40001 of https://codereview.chromium.org/1412803009/ )

Reason for revert:
Valgrind failures: http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/631/steps/nanobench/logs/stdio

==14022== Conditional jump or move depends on uninitialised value(s)
==14022==    at 0x6A1DD6: S32A_Opaque_BlitRow32_SSE4(unsigned int*, unsigned int const*, int, unsigned int) (SkBlitRow_opts_SSE4.cpp:47)
==14022==    by 0x5A7EEA: Sprite_D32_S32::blitRect(int, int, int, int) (SkSpriteBlitter_ARGB32.cpp:47)
==14022==    by 0x57DD8A: SkScan::FillIRect(SkIRect const&, SkRegion const*, SkBlitter*) (SkScan.cpp:15)
==14022==    by 0x57DEDC: SkScan::FillIRect(SkIRect const&, SkRasterClip const&, SkBlitter*) (SkScan.cpp:73)
==14022==    by 0x536072: SkDraw::drawBitmap(SkBitmap const&, SkMatrix const&, SkRect const*, SkPaint const&) const (SkDraw.cpp:1286)
==14022==    by 0x59CC50: SkBitmapDevice::drawBitmap(SkDraw const&, SkBitmap const&, SkMatrix const&, SkPaint const&) (SkBitmapDevice.cpp:248)
==14022==    by 0x52F0DC: SkBaseDevice::drawImage(SkDraw const&, SkImage const*, float, float, SkPaint const&) (SkDevice.cpp:150)
==14022==    by 0x525139: SkCanvas::onDrawImage(SkImage const*, float, float, SkPaint const*) (SkCanvas.cpp:2180)
==14022==    by 0x5279A0: SkCanvas::drawImage(SkImage const*, float, float, SkPaint const*) (SkCanvas.cpp:1864)
==14022==    by 0x441C83: SKPBench::onPerCanvasPostDraw(SkCanvas*) (SKPBench.cpp:95)
==14022==    by 0x40A3FF: Benchmark::perCanvasPostDraw(SkCanvas*) (Benchmark.cpp:53)
==14022==    by 0x44C527: nanobench_main() (nanobench.cpp:1254)
==14022==    by 0x44D1E6: main (nanobench.cpp:1344)
==14022==  Uninitialised value was created by a heap allocation
==14022==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14022==    by 0x602DAC: chromium_jpeg_get_large (jmemnobs.c:57)
==14022==    by 0x602818: alloc_large (jmemmgr.c:376)
==14022==    by 0x602A2E: alloc_sarray (jmemmgr.c:453)
==14022==    by 0x614983: chromium_jinit_d_main_controller (jdmainct.c:450)
==14022==    by 0x5FD3A0: chromium_jinit_master_decompress (jdmaster.c:577)
==14022==    by 0x5F9198: chromium_jpeg_start_decompress (jdapistd.c:46)
==14022==    by 0x680C22: SkJPEGImageDecoder::onDecode(SkStream*, SkBitmap*, SkImageDecoder::Mode) (SkImageDecoder_libjpeg.cpp:575)
==14022==    by 0x67BCE8: SkImageDecoder::decode(SkStream*, SkBitmap*, SkColorType, SkImageDecoder::Mode) (SkImageDecoder.cpp:138)
==14022==    by 0x6845E3: SkImageDecoderGenerator::onGetPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*) (SkImageGenerator_skia.cpp:59)
==14022==    by 0x53D4C7: SkImageGenerator::getPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*) (SkImageGenerator.cpp:40)
==14022==    by 0x53D6DF: SkImageGenerator::tryGenerateBitmap(SkBitmap*, SkImageInfo const*, SkBitmap::Allocator*) (SkImageGenerator.cpp:179)
==14022==    by 0x53D334: SkImageCacherator::generateBitmap(SkBitmap*) (SkImageGenerator.h:174)
==14022==    by 0x53D3A1: SkImageCacherator::tryLockAsBitmap(SkBitmap*, SkImage const*) (SkImageCacherator.cpp:118)
==14022==    by 0x53D3EA: SkImageCacherator::lockAsBitmap(SkBitmap*, SkImage const*) (SkImageCacherator.cpp:132)
==14022==    by 0x58EDCF: SkImage_Generator::getROPixels(SkBitmap*) const (SkImage_Generator.cpp:59)
==14022==    by 0x52F007: SkBaseDevice::drawImageRect(SkDraw const&, SkImage const*, SkRect const*, SkRect const&, SkPaint const&, SkCanvas::SrcRectConstraint) (SkDevice.cpp:159)
==14022==    by 0x5255E0: SkCanvas::onDrawImageRect(SkImage const*, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::SrcRectConstraint) (SkCanvas.cpp:2209)
==14022==    by 0x5279DC: SkCanvas::drawImageRect(SkImage const*, SkRect const&, SkRect const&, SkPaint const*, SkCanvas::SrcRectConstraint) (SkCanvas.cpp:1872)

Original issue's description:
> 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

TBR=scroggo@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoAdd text animation sample; tweak DrawShip sample
jvanverth [Sun, 8 Nov 2015 16:07:24 +0000 (08:07 -0800)]
Add text animation sample; tweak DrawShip sample

Committed: https://skia.googlesource.com/skia/+/3b484a40b3be7f0262afadeaf6b741ba5cedcfe1

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

9 years agoUpdate SKP version
update-skps [Sun, 8 Nov 2015 08:30:20 +0000 (00:30 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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

9 years agoComments Style: s/skbug.com/bug.skia.org/
halcanary [Sat, 7 Nov 2015 13:29:00 +0000 (05:29 -0800)]
Comments Style:  s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

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

9 years agoavx and avx2 detection
mtklein [Sat, 7 Nov 2015 03:48:19 +0000 (19:48 -0800)]
avx and avx2 detection

This doesn't do anything yet beyond print out a message in Debug mode,
but it's a start.  Those messages should match the -SSE4-, -AVX-, or -AVX2- in
the Test-...-Debug-Trybots below.  The Release ones are just running by accident.

So far they look right to me.

BUG=skia:

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

9 years agoRevert of Add text animation sample; tweak DrawShip sample (patchset #3 id:40001...
jvanverth [Sat, 7 Nov 2015 00:10:34 +0000 (16:10 -0800)]
Revert of Add text animation sample; tweak DrawShip sample (patchset #3 id:40001 of https://codereview.chromium.org/1410663005/ )

Reason for revert:
CrOS bots failing.

Original issue's description:
> Add text animation sample; tweak DrawShip sample
>
> Committed: https://skia.googlesource.com/skia/+/3b484a40b3be7f0262afadeaf6b741ba5cedcfe1

TBR=robertphillips@google.com,bsalomon@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoAdd text animation sample; tweak DrawShip sample
jvanverth [Fri, 6 Nov 2015 22:20:03 +0000 (14:20 -0800)]
Add text animation sample; tweak DrawShip sample

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

9 years agoSkPx: new approach to fixed-point SIMD
mtklein [Fri, 6 Nov 2015 22:10:48 +0000 (14:10 -0800)]
SkPx: new approach to fixed-point SIMD

SkPx is like Sk4px, except each platform implementation of SkPx can declare
a different sweet spot of N pixels, with extra loads and stores to handle the
ragged edge of 0<n<N pixels.

In this case, _sse's sweet spot remains 4 pixels.   _neon jumps up to 8 so
we can now use NEON's transposing loads and stores, and _none is just 1.
This makes operations involving alpha considerably more efficient on NEON,
as alpha is its own distinct 8x8 bit plane that's easy to toss around.

This incorporates a few other improvements I've been wanting:
  - no requirement that we're dealing with SkPMColor.  SkColor works too.
  - no anonymous namespace hack to differentiate implementations.

Codegen and perf look good on Clang/x86-64 and GCC/ARMv7.
The NEON code looks very similar to the old NEON code, as intended.
No .skp or GM diffs on my laptop.  Don't expect any.

I intend this to replace Sk4px.  Plan after landing:
  - port SkXfermode_opts.h
  - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other
    SkOpts code)
  - delete all Sk4px-related code
  - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.)
    leaving Sk2f, Sk4f (and Sk2s, Sk4s).
  - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels
    at a time.

In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels.

BUG=skia:4117

Committed: https://skia.googlesource.com/skia/+/82c93b45ed6ac0b628adb8375389c202d1f586f9

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.compile:Build-Mac10.8-Clang-Arm7-Debug-Android-Trybot

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

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

9 years agoClean up GrBatchAtlas a bit
robertphillips [Fri, 6 Nov 2015 22:10:42 +0000 (14:10 -0800)]
Clean up GrBatchAtlas a bit

The main thrust of this CL is to remove knowledge of the atlas' backing texture from the BatchPlot. It also reduces the API surface of the BatchPlot and shrinks the amount of fields in the BatchAtlas.

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

9 years agoadd sequence for nov talk
reed [Fri, 6 Nov 2015 20:36:24 +0000 (12:36 -0800)]
add sequence for nov talk

BUG=skia:
TBR=
NOTRY=True
NOTREECHECKS=True

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

9 years agoFix the build on Android devices
Matt Sarett [Fri, 6 Nov 2015 19:59:01 +0000 (14:59 -0500)]
Fix the build on Android devices

9 years agoRevert of SkPx: new approach to fixed-point SIMD (patchset #12 id:220001 of https...
mtklein [Fri, 6 Nov 2015 19:34:06 +0000 (11:34 -0800)]
Revert of SkPx: new approach to fixed-point SIMD (patchset #12 id:220001 of https://codereview.chromium.org/1317233005/ )

Reason for revert:
master-skia unhappy:
https://android-build.storage.googleapis.com/builds/git_master-skia-linux-volantis-userdebug/2404853/e6c439e806fb0bd0f872a3d7a5cf0637d4ad11bfaa89e9bc18b651dc65f0a36b/logs/build_error.log?GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Signature=WOqQO7xHkv83SmC4h5tNUIp%2BREaYULqK11hNTWlhj1XXo0NAOQd7GNSIHl775uRRZpBw2LkHeb2Ups3LsgRPrldqymposFtDa%2BUEW0Jv2NWAr%2F1Cqt6lwWsfknvJLN9NiEGfpCCye3Q%2FEYx9bU1ozMBG6h2DRHJUMRS%2FjstkJg0%3D&Expires=1446838937

Original issue's description:
> SkPx: new approach to fixed-point SIMD
>
> SkPx is like Sk4px, except each platform implementation of SkPx can declare
> a different sweet spot of N pixels, with extra loads and stores to handle the
> ragged edge of 0<n<N pixels.
>
> In this case, _sse's sweet spot remains 4 pixels.   _neon jumps up to 8 so
> we can now use NEON's transposing loads and stores, and _none is just 1.
> This makes operations involving alpha considerably more efficient on NEON,
> as alpha is its own distinct 8x8 bit plane that's easy to toss around.
>
> This incorporates a few other improvements I've been wanting:
>   - no requirement that we're dealing with SkPMColor.  SkColor works too.
>   - no anonymous namespace hack to differentiate implementations.
>
> Codegen and perf look good on Clang/x86-64 and GCC/ARMv7.
> The NEON code looks very similar to the old NEON code, as intended.
> No .skp or GM diffs on my laptop.  Don't expect any.
>
> I intend this to replace Sk4px.  Plan after landing:
>   - port SkXfermode_opts.h
>   - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other
>     SkOpts code)
>   - delete all Sk4px-related code
>   - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.)
>     leaving Sk2f, Sk4f (and Sk2s, Sk4s).
>   - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels
>     at a time.
>
> In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels.
>
> BUG=skia:4117
>
> Committed: https://skia.googlesource.com/skia/+/82c93b45ed6ac0b628adb8375389c202d1f586f9
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.compile:Build-Mac10.8-Clang-Arm7-Debug-Android-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/a7627dc5cc2bf5d9a95d883d20c40d477ecadadf

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

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

9 years agoAdding Skia Debugger documentation
hcm [Fri, 6 Nov 2015 19:29:06 +0000 (11:29 -0800)]
Adding Skia Debugger documentation

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

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

9 years agoRemove dependencies on Android's forked decoder libraries
msarett [Fri, 6 Nov 2015 19:15:49 +0000 (11:15 -0800)]
Remove dependencies on Android's forked decoder libraries

Disable SkImageDecoder's code which relies on Android's customized
libpng and libjpeg. Build standard versions of libpng and libjpeg-turbo
everywhere. The SkImageDecoder code has been replaced with SkCodec, which
can decode subsets using standard library APIs

BUG=skia:

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

9 years agoChange quality settings on SkImageDecoder_libjpeg
msarett [Fri, 6 Nov 2015 19:02:06 +0000 (11:02 -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:

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

9 years agoExport tools as an include directory for Android
msarett [Fri, 6 Nov 2015 18:53:01 +0000 (10:53 -0800)]
Export tools as an include directory for Android

BUG=skia:

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

9 years agocompare has a syntax error where it is missing the path to sem().
herb [Fri, 6 Nov 2015 18:35:37 +0000 (10:35 -0800)]
compare has a syntax error where it is missing the path to sem().
BUG=skia:

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

9 years agoSkPx: new approach to fixed-point SIMD
mtklein [Fri, 6 Nov 2015 17:18:57 +0000 (09:18 -0800)]
SkPx: new approach to fixed-point SIMD

SkPx is like Sk4px, except each platform implementation of SkPx can declare
a different sweet spot of N pixels, with extra loads and stores to handle the
ragged edge of 0<n<N pixels.

In this case, _sse's sweet spot remains 4 pixels.   _neon jumps up to 8 so
we can now use NEON's transposing loads and stores, and _none is just 1.
This makes operations involving alpha considerably more efficient on NEON,
as alpha is its own distinct 8x8 bit plane that's easy to toss around.

This incorporates a few other improvements I've been wanting:
  - no requirement that we're dealing with SkPMColor.  SkColor works too.
  - no anonymous namespace hack to differentiate implementations.

Codegen and perf look good on Clang/x86-64 and GCC/ARMv7.
The NEON code looks very similar to the old NEON code, as intended.
No .skp or GM diffs on my laptop.  Don't expect any.

I intend this to replace Sk4px.  Plan after landing:
  - port SkXfermode_opts.h
  - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other
    SkOpts code)
  - delete all Sk4px-related code
  - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.)
    leaving Sk2f, Sk4f (and Sk2s, Sk4s).
  - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels
    at a time.

In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels.

BUG=skia:4117

Committed: https://skia.googlesource.com/skia/+/82c93b45ed6ac0b628adb8375389c202d1f586f9

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.compile:Build-Mac10.8-Clang-Arm7-Debug-Android-Trybot

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

9 years agoRename SkBitmapRegionDecoder and Create function
msarett [Fri, 6 Nov 2015 16:56:32 +0000 (08:56 -0800)]
Rename SkBitmapRegionDecoder and Create function

We no longer need to worry about namespace
conflicts SkBitmapRegionDecoder in Android (which
we are replacing).

Additionally, the static Create() function does not
need to repeat the name BitmapRegionDecoder.

BUG=skia:

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

9 years agoSkPDF: images support 32-but-not-N32 colortype
halcanary [Fri, 6 Nov 2015 15:27:23 +0000 (07:27 -0800)]
SkPDF: images support 32-but-not-N32 colortype

BUG=550559

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

9 years agoLoosen requirements for mixed samples support
cdalton [Fri, 6 Nov 2015 15:09:43 +0000 (07:09 -0800)]
Loosen requirements for mixed samples support

Quits requiring EXT_raster_multisample and
NV_sample_mask_override_coverage for mixed samples support. This will
allow platforms without those latter extensions (i.e. Chrome) to still
use mixed samples for path rendering. Also moves the mixed samples cap
out of shader caps, since it no longer denotes shader functionality.

BUG=skia:

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

9 years agoAdd addFragPosUniform to GrGLrogramBuilder
egdaniel [Fri, 6 Nov 2015 14:57:12 +0000 (06:57 -0800)]
Add addFragPosUniform to GrGLrogramBuilder

BUG=skia:

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

9 years agoRevert of Update Layer Hoisting to store its atlas texture in the resource cache...
robertphillips [Fri, 6 Nov 2015 13:59:14 +0000 (05:59 -0800)]
Revert of Update Layer Hoisting to store its atlas texture in the resource cache (patchset #6 id:100001 of https://codereview.chromium.org/1406013006/ )

Reason for revert:
Android

Original issue's description:
> Update Layer Hoisting to store its atlas texture in the resource cache
>
> BUG=skia:4346
>
> Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4346

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

9 years agoUpdate Layer Hoisting to store its atlas texture in the resource cache
robertphillips [Fri, 6 Nov 2015 12:14:55 +0000 (04:14 -0800)]
Update Layer Hoisting to store its atlas texture in the resource cache

BUG=skia:4346

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

9 years agoSkBitmapRegionCodec needs to use the rowBytes on the pixel ref
msarett [Thu, 5 Nov 2015 23:00:56 +0000 (15:00 -0800)]
SkBitmapRegionCodec needs to use the rowBytes on the pixel ref

BUG=skia:4538

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

9 years agoMake SkBlurImageFilter capable of cropping during blur (GPU path).
senorblanco [Thu, 5 Nov 2015 22:48:43 +0000 (14:48 -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

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

9 years agoCreate Sample that combines combose shader and coons patch
egdaniel [Thu, 5 Nov 2015 21:09:08 +0000 (13:09 -0800)]
Create Sample that combines combose shader and coons patch

BUG=skia:

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

9 years agoadd --sequence filename option to SampleApp
reed [Thu, 5 Nov 2015 19:59:17 +0000 (11:59 -0800)]
add --sequence filename option to SampleApp

BUG=skia:

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

9 years agoWire up SDL on Android
joshualitt [Thu, 5 Nov 2015 19:49:35 +0000 (11:49 -0800)]
Wire up SDL on Android

BUG=skia:

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

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

9 years agoFix bug in sampled decodes
msarett [Thu, 5 Nov 2015 19:19:29 +0000 (11:19 -0800)]
Fix bug in sampled decodes

BUG=skia:

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

9 years agoRevert of Wire up SDL on Android (patchset #4 id:60001 of https://codereview.chromium...
joshualitt [Thu, 5 Nov 2015 18:48:41 +0000 (10:48 -0800)]
Revert of Wire up SDL on Android (patchset #4 id:60001 of https://codereview.chromium.org/1415453009/ )

Reason for revert:
breaks appurify

Original issue's description:
> Wire up SDL on Android
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/a4d3797c3b0f0cac8493c46cb334ca88a5d6ccf6

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

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

9 years agoRename non-aa rect methods on GrDrawContext in anticipation of making them support aa
bsalomon [Thu, 5 Nov 2015 18:41:43 +0000 (10:41 -0800)]
Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa

R=joshualitt@google.com

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

9 years agoFor non-opaque SkBitmapDevices, replace malloc-then-zero with calloc.
mtklein [Thu, 5 Nov 2015 17:46:23 +0000 (09:46 -0800)]
For non-opaque SkBitmapDevices, replace malloc-then-zero with calloc.

There seem about a zillion possible ways to slice this.
This adds and uses SkMallocPixelRef::ZeroedPRFactory.
I'm not married to it.

This appears to clear up a hot spot in the benchmark referenced in this bug:
BUG=516426
I'm not confident enough on Windows to declare that definitively yet.

It probably helps all other non-opaque layers too.  Possibly significantly.

So I don't forget, I profiled this:
out/Release/performance_browser_tests.exe  --gtest_filter=TabCapturePerformanceTest.Performance/2 --single-process

No diffs:
https://gold.skia.org/search2?issue=1430593007&unt=true&query=source_type%3Dgm&master=false

TBR=reed@google.com

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

9 years agoMake bicubic FP factories return const FPs
bsalomon [Thu, 5 Nov 2015 17:35:01 +0000 (09:35 -0800)]
Make bicubic FP factories return const FPs

TBR=egdaniel@google.com

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

9 years agoWire up SDL on Android
joshualitt [Thu, 5 Nov 2015 16:35:31 +0000 (08:35 -0800)]
Wire up SDL on Android

BUG=skia:

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

9 years agoAdd ifdef guard around gpu-specific code in native windows window.
plesner [Thu, 5 Nov 2015 16:10:45 +0000 (08:10 -0800)]
Add ifdef guard around gpu-specific code in native windows window.

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

9 years agoAssert when running SampleApp with msaa 16 on Windows 10
aleksandar.stojiljkovic [Thu, 5 Nov 2015 15:48:12 +0000 (07:48 -0800)]
Assert when running SampleApp with msaa 16 on Windows 10

Trivial: skip calling SkWGLExtensions::selectFormat with 0 elements,
 and handle if called.

BUG=4529

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

9 years agoFix for atlas doesn't call eviction functions
joshualitt [Thu, 5 Nov 2015 15:14:56 +0000 (07:14 -0800)]
Fix for atlas doesn't call eviction functions

TBR=
BUG=551094

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

9 years agoCreate SDL backed SkOSWindow
joshualitt [Wed, 4 Nov 2015 21:41:02 +0000 (13:41 -0800)]
Create SDL backed SkOSWindow

BUG=skia:

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

9 years agoRevert[4] of "stop using drawSprite (at least w/ no filters) as it is going away"
reed [Wed, 4 Nov 2015 16:34:07 +0000 (08:34 -0800)]
Revert[4] of "stop using drawSprite (at least w/ no filters) as it is going away"

This reverts commit 67b8b5e67a427382fed8c5d8b3c70a21ed2492c6.

BUG=skia:
TBR=

Previous revert was due to faulty unittest (now fixed) -- unrelated to this CL.

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

9 years agoSkRecord: text blobs
mtklein [Wed, 4 Nov 2015 16:19:24 +0000 (08:19 -0800)]
SkRecord: text blobs

Other text as blobs to follow.

https://gold.skia.org/search2?issue=1417703009&unt=true&query=source_type%3Dgm&master=false&include=true

BUG=skia:

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

9 years agoAvoid hang in OncePtr test with --threads 1
kkinnunen [Wed, 4 Nov 2015 14:30:17 +0000 (06:30 -0800)]
Avoid hang in OncePtr test with --threads 1

Avoid hang in OncePtr test when using "dm --threads 1".

The test will hang the threads until sk_num_cores() threads have run
the code. This requires that sk_num_cores() threads to be run in
parallel, which the global thread pool will not do if the thread count
is smaller than sk_num_cores().

BUG=skia:

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

9 years agoAdd outer blur to bleed GM family
bsalomon [Wed, 4 Nov 2015 12:36:12 +0000 (04:36 -0800)]
Add outer blur to bleed GM family

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

9 years agoMake AndroidOptions const
scroggo [Wed, 4 Nov 2015 12:31:12 +0000 (04:31 -0800)]
Make AndroidOptions const

Make the struct passed to SkAndroidCodec::getAndroidPixels const. This
matches SkCodec, and makes sense, since it is not used as an output.

Brought up in crrev.com/1417583009

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

9 years agoUpdate RecordReplaceDraw unit test
robertphillips [Wed, 4 Nov 2015 12:31:06 +0000 (04:31 -0800)]
Update RecordReplaceDraw unit test

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

9 years agoCompile bitmap_region_decoder on Android
msarett [Wed, 4 Nov 2015 12:28:59 +0000 (04:28 -0800)]
Compile bitmap_region_decoder on Android

BUG=skia:

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

9 years agoFix an error message
scroggo [Wed, 4 Nov 2015 12:28:54 +0000 (04:28 -0800)]
Fix an error message

Remove double negative.
Also, change another error message to be slightly (meaningfully)
different so I can find the right one based on the log.

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

9 years agoCreate swizzle table inside of glsl caps
egdaniel [Wed, 4 Nov 2015 12:23:53 +0000 (04:23 -0800)]
Create swizzle table inside of glsl caps

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/4036674952f341dab0695c3b054fefa5bb8cdec1

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

9 years agochange alpha bmp generator in bleed to make more discernable results
bsalomon [Wed, 4 Nov 2015 12:23:45 +0000 (04:23 -0800)]
change alpha bmp generator in bleed to make more discernable results

TBR=robertphillips@google.com

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

9 years agobin/deps-and-gyp -> bin/sync-and-gyp
mtklein [Tue, 3 Nov 2015 20:07:47 +0000 (12:07 -0800)]
bin/deps-and-gyp -> bin/sync-and-gyp

NOTREECHECKS=true

BUG=skia:

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

9 years agoRevert of Reland "By default purge resources that haven't been used for 64 flushes...
bsalomon [Tue, 3 Nov 2015 19:48:43 +0000 (11:48 -0800)]
Revert of Reland "By default purge resources that haven't been used for 64 flushes (patchset #5 id:80001 of h… (patchset #1 id:1 of https://codereview.chromium.org/1428053003/ )

Reason for revert:
Breaking the DEPS roller - again

Original issue's description:
> Reland "By default purge resources that haven't been used for 64 flushes (patchset #5 id:80001 of https://codereview.chromium.org/1316233003/ )"
>
> TBR=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/f7de08a52b5287cb16b2e89a8e3691676a4dbe5f

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

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

9 years agoRevert of Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going...
reed [Tue, 3 Nov 2015 19:27:07 +0000 (11:27 -0800)]
Revert of Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away" (patchset #1 id:1 of https://codereview.chromium.org/1410343011/ )

Reason for revert:
failing on msaa

Original issue's description:
> Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away"
>
> Fixed assert in test that was calling GrRecordReplaceDraw(). That function now uses
> drawBitmap, so updated the test to check for that (instead of drawSprite).
>
> This reverts commit 21b766347064837e6b78d600755901aad88cd6e0.
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/7b81994d95f10cda80ddb85af68a2651ff31782f

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agobin/deps-and-gyp: deal with corner cases cleanly
halcanary [Tue, 3 Nov 2015 19:18:11 +0000 (11:18 -0800)]
bin/deps-and-gyp: deal with corner cases cleanly

TBR=mtklein@google.com
NOTRY=true

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

9 years agoTake mutex when calling into FreeType.
bungeman [Tue, 3 Nov 2015 19:07:20 +0000 (11:07 -0800)]
Take mutex when calling into FreeType.

SkScalerContext_FreeType::generateCharToGlyph and generateGlyphToChar
do not take a mutex when calling into FreeType, but they need to.
The setupSize method also requires the mutex to be locked, which is
not a problem since it currently always is, but add a debug assert
to ensure that it continues to be.

BUG=chromium:542640

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

9 years agoRevert of Create swizzle table inside of glsl caps (patchset #12 id:210001 of https...
egdaniel [Tue, 3 Nov 2015 18:33:14 +0000 (10:33 -0800)]
Revert of Create swizzle table inside of glsl caps (patchset #12 id:210001 of https://codereview.chromium.org/1420033005/ )

Reason for revert:
Breaking gm's on nexus7 and s3

Original issue's description:
> Create swizzle table inside of glsl caps
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4036674952f341dab0695c3b054fefa5bb8cdec1

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agobin/deps-and-gyp: gclient-free solution
halcanary [Tue, 3 Nov 2015 18:30:05 +0000 (10:30 -0800)]
bin/deps-and-gyp: gclient-free solution

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

9 years agotools/git-sync-deps: speed up common case by skipping fetch
halcanary [Tue, 3 Nov 2015 17:50:03 +0000 (09:50 -0800)]
tools/git-sync-deps: speed up common case by skipping fetch

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

9 years agoSkRemote: saveLayer
mtklein [Tue, 3 Nov 2015 17:45:03 +0000 (09:45 -0800)]
SkRemote: saveLayer

https://gold.skia.org/search2?issue=1432593002&unt=true&query=source_type%3Dgm&master=false&include=true

BUG=skia:

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

9 years agoFix setColocatedSampleLocations on ES and GL < 4.5
cdalton [Tue, 3 Nov 2015 17:33:21 +0000 (09:33 -0800)]
Fix setColocatedSampleLocations on ES and GL < 4.5

Updates setColocatedSampleLocations to use glFramebufferParameteri when
the DSA version glNamedFramebufferParameteri is not present.

BUG=skia:

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

9 years agoCreate swizzle table inside of glsl caps
egdaniel [Tue, 3 Nov 2015 16:15:28 +0000 (08:15 -0800)]
Create swizzle table inside of glsl caps

BUG=skia:

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

9 years agoCombine native sampling with sampling
scroggo [Tue, 3 Nov 2015 15:55:11 +0000 (07:55 -0800)]
Combine native sampling with sampling

In SkSampledCodec, allow the native codec to do its scaling first, then
sample on top of that. Since the only codec which can do native scaling
is JPEG, and we know what it can do, hard-code for JPEG. Check to see
if the sampleSize is something JPEG supports, or a multiple of
something it supports. If so, use JPEG directly or combine them.

BUG=skia:4320

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