Commit Graph

19714 Commits

Author SHA1 Message Date
bungeman
147ea2fb7a 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
2015-11-12 09:50:08 -08:00
cdalton
3aea725371 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
2015-11-12 09:18:49 -08:00
herb
386127f1d4 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
2015-11-12 08:53:42 -08:00
mtklein
d7b25c734e 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
2015-11-12 08:41:40 -08:00
scroggo
95105938da Add include guards for SkBRDAllocator
One step towards fixing the master-skia build

Review URL: https://codereview.chromium.org/1440883002
2015-11-11 22:54:24 -08:00
bsalomon
3877ab81ba In SkGpuDevice;drawTextureAdjuster perform texture w\h divide in texture matrix
Review URL: https://codereview.chromium.org/1440763002
2015-11-11 16:52:03 -08:00
cdalton
ede7574817 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
2015-11-11 15:27:57 -08:00
cdalton
7e806f3f8a 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
2015-11-11 15:16:07 -08:00
cdalton
24ddb0a4dd 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
2015-11-11 15:03:46 -08:00
msarett
cb8d719d7a 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
2015-11-11 13:30:43 -08:00
robertphillips
caef345048 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
2015-11-11 13:18:11 -08:00
joshualitt
dad57c8c48 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
2015-11-11 13:17:06 -08:00
egdaniel
2d721d33aa Move all ShaderBuilder files to GLSL
BUG=skia:

Review URL: https://codereview.chromium.org/1438003003
2015-11-11 13:06:05 -08:00
msarett
33bee090fa Fix -Wunused-parameter errors in SkCodec.h in Android
BUG=skia:

Review URL: https://codereview.chromium.org/1437823004
2015-11-11 12:43:07 -08:00
bsalomon
67d7620285 Fix leaks in unit tests of GrGLTextureInfos
TBR=egdaniel@google.com

Review URL: https://codereview.chromium.org/1433353005
2015-11-11 12:40:42 -08:00
robertphillips
a13e202563 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
2015-11-11 12:01:09 -08:00
mtklein
084db25d47 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
2015-11-11 11:39:09 -08:00
herb
9be5ff6f98 Replace glyph find and position with common code for the gpu bitmap case.
BUG=skia:

Review URL: https://codereview.chromium.org/1424173005
2015-11-11 11:30:11 -08:00
benjaminwagner
0b2a189221 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
2015-11-11 08:46:34 -08:00
msarett
b5213e69c5 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
2015-11-11 06:41:02 -08:00
egdaniel
8dcdedc4a0 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
2015-11-11 06:27:20 -08:00
msarett
49115b57cb 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
2015-11-11 06:21:27 -08:00
msarett
84a8065275 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
2015-11-10 15:49:46 -08:00
msarett
5c351f38fa 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
2015-11-10 15:38:23 -08:00
msarett
5c9e34a350 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
2015-11-10 15:24:10 -08:00
msarett
164d302ebf 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
2015-11-10 15:09:04 -08:00
msarett
0459c9425f 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
2015-11-10 14:52:13 -08:00
bungeman
fbd87d611a 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
2015-11-10 13:29:44 -08:00
cdalton
d472792a72 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
2015-11-10 12:49:06 -08:00
bsalomon
091f60c2a0 Use a struct for client GL texture handles
Review URL: https://codereview.chromium.org/1429863009
2015-11-10 11:54:57 -08:00
msarett
6dfe9ac3aa 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
2015-11-10 11:22:12 -08:00
Hal Canary
824f46ca2c GYP: remove stale skia_scalar gyp variable
DOCS_PREVIEW= https://skia.org/?cl=1417703013

Review URL: https://codereview.chromium.org/1417703013 .
2015-11-10 13:25:12 -05:00
robertphillips
1f0e350af6 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
2015-11-10 10:19:51 -08:00
halcanary
80ec3dbf72 SkPDF: Deal with missing ColorTable (don't assert)
Review URL: https://codereview.chromium.org/1414083005
2015-11-10 09:48:40 -08:00
bsalomon
5fb56f18b6 Fix reversion to bilerp on clipped mipmap draws
Review URL: https://codereview.chromium.org/1437573004
2015-11-10 09:18:32 -08:00
joshualitt
43f610f693 Parse command line arguments for sdl + android
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/1432983002
2015-11-10 08:27:22 -08:00
joshualitt
01f4a9e7bf Fixes for building with sdl on android
BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1437613002
2015-11-10 07:36:18 -08:00
senorblanco
07d56b1392 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
2015-11-10 07:32:37 -08:00
aleksandar.stojiljkovic
07e2692da3 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
2015-11-10 04:55:15 -08:00
reed
d9ffaed6d2 apply mozilla patch
BUG=skia:4547

Review URL: https://codereview.chromium.org/1421793009
2015-11-10 04:55:08 -08:00
cdalton
14184d5567 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
2015-11-09 15:12:19 -08:00
robertphillips
60029a5397 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
2015-11-09 13:51:06 -08:00
herb
e5911c9c5b 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
2015-11-09 13:15:21 -08:00
reed
b2ce0b0735 demo tweaks, scale up perlin, add call to flush for fps
BUG=skia:
TBR=bsalomon

Review URL: https://codereview.chromium.org/1419983006
2015-11-09 13:10:30 -08:00
joshualitt
47fdae9807 Wire up SDL on mac
BUG=skia:

Review URL: https://codereview.chromium.org/1428633003
2015-11-09 12:30:05 -08:00
bsalomon
c55271f255 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
2015-11-09 11:55:57 -08:00
halcanary
3a210bfd40 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
2015-11-09 11:47:09 -08:00
herb
a267904213 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
2015-11-09 10:49:29 -08:00
bsalomon
5c1262d7f7 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
2015-11-09 10:06:06 -08:00
egdaniel
edce2a8576 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
2015-11-09 10:04:20 -08:00