Commit Graph

25007 Commits

Author SHA1 Message Date
Ben Wagner
9c46b68d53 Revert "Further centralize computation of GrSurface VRAM consumption"
This reverts commit ccd3c8937f.

Reason for revert: Blocking Chromium roll: https://codereview.chromium.org/2482643002/

Original change's description:
> Further centralize computation of GrSurface VRAM consumption
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4383
> 
> Change-Id: I054b74f2cd15f904f8e05af0fda58d6e8a523eb9
> Reviewed-on: https://skia-review.googlesource.com/4383
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=662630

Change-Id: I186db2a41eb2bd789e6f681b3547e32d9ca374cf
Reviewed-on: https://skia-review.googlesource.com/4443
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2016-11-06 12:47:22 +00:00
Ben Wagner
ce4d04ae8e Revert "Limit GL_TEXTURE_RECTANGLE filtering to bilinear."
This reverts commit 4d53c44aa6.

Reason for revert: Depends on https://skia-review.googlesource.com/c/4383/ which I need to revert.

Original change's description:
> Limit GL_TEXTURE_RECTANGLE filtering to bilinear.
> 
> Adds a clamp for GrTexture filtering that can be set by a subclass at construction. The clamping is performed by GrTextureParams. GrGLTexture limits filtering to bilinear for rectangle and external textures.
> 
> Also moves samplerType() to GrTexturePriv from GrTexture.
> 
> BUG=skia:5932
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4352
> 
> Change-Id: I1f023d4f4133e7eb393367580c0558257e56c8db
> Reviewed-on: https://skia-review.googlesource.com/4352
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> 

TBR=bsalomon@google.com,csmartdalton@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=662630

Change-Id: I012aa208594ccff0bb81bece8110a38e1f83ae00
Reviewed-on: https://skia-review.googlesource.com/4444
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2016-11-06 12:46:50 +00:00
update-skps
301dfc0bba Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2482733002

Review-Url: https://codereview.chromium.org/2482733002
2016-11-06 01:05:03 -08:00
stephana
db64acacf9 Add indexfile to obsolute quickstart section
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2477153002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2477153002

Review-Url: https://codereview.chromium.org/2477153002
2016-11-05 13:28:47 -07:00
liyuqian
525e13c1d3 Fix the sum of alpha = 254 instead of 255 by rounding
This patch is a subpatch from https://codereview.chromium.org/2471133002/

I created this CL mainly for Florin to land before he rebaseline the Chrome
layout tests. (Landing the whole patch of 2471133002 would be nice but most
people already left for the weekend so I'd rather not take the risk to break
the Skia during the weekend.)

BUG=skia:

TBR=reed@google.com, mtklein@google.com, fmalita@chromium.org
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2483523002

Review-Url: https://codereview.chromium.org/2483523002
2016-11-05 06:34:22 -07:00
skia.buildbots
2478c73bb8 Make buildbotless trybots only support Gerrit
BUG=skia:5723

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4460

Change-Id: Ia5630de72f8b473551a5357fdf50eb3dd288b9a7
Reviewed-on: https://skia-review.googlesource.com/4460
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2016-11-04 22:09:21 +00:00
Ben Wagner
d9fcb236a4 Attempt to fix PixelC GLSL compilation error.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4436
CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android-Trybot,Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android-Trybot

Change-Id: Id8ad69b5128653ba16dd99418334be75eb3485c5
Reviewed-on: https://skia-review.googlesource.com/4436
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2016-11-04 21:15:23 +00:00
Mike Klein
c509341107 swap_src_dst -> move_src_dst
We thought it'd be handy to have swap_src_dst so that it could be used
either to move dst into src or src into dst.  Turns out, we already have
a stage that moves dst into src (called "dst", the dst blend mode), so
there's really no reason to have swap_src_dst over the strictly more
efficient move_src_dst.

swap_src_dst is typically 12 register moves, where move_src_dst is 4.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4461

Change-Id: Ib453775f854e313f823851978eaadc3995872312
Reviewed-on: https://skia-review.googlesource.com/4461
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-04 21:11:01 +00:00
Mike Klein
e33998aa26 Trim down quick start docs for a GN world.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4431
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=4431

Change-Id: I2a10494158e7415ae655baf212a951afd87dcbde
Reviewed-on: https://skia-review.googlesource.com/4431
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-04 21:05:45 +00:00
Matt Sarett
61eedebe4c Add F16, SkColorSpaceXform support to SkGifCodec
BUG=skia:4895

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4396

Change-Id: I7c521760891852daf4f3933ecf02dc08acec64c0
Reviewed-on: https://skia-review.googlesource.com/4396
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-11-04 20:55:16 +00:00
mtklein
125b2aac5a Detect pipelines which can compile to memsets.
Any pipeline that looks like:
  - constant_color
  - store_fmt
can be trivially converted into an sk_memset of the right size for fmt.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2477013002

Review-Url: https://codereview.chromium.org/2477013002
2016-11-04 13:41:34 -07:00
caryclark
2fd58a29d3 Revert of use reversePathTo in place of addPathReverse (patchset #1 id:1 of https://codereview.chromium.org/2481463002/ )
Reason for revert:
breqking some bots

Original issue's description:
> use reversePathTo in place of addPathReverse
>
> Path ops was using addPathReverse, instead of reversePathTo.
> The former adds a moveTo always, and the latter requires
> that the caller add the moveTo if needed.
>
> Simplify the reversePathTo implementation.
>
> R=reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2481463002
>
> Committed: https://skia.googlesource.com/skia/+/d8db392be9dd1887df04b10b5670991d6b098c17

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2478763003
2016-11-04 13:31:54 -07:00
Matt Sarett
fba1420715 Avoid pretending to support CMYK color xforms in SkJpegCodec
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4439

Change-Id: I274930fd947585e7b2a4716c5c51aef267574ddd
Reviewed-on: https://skia-review.googlesource.com/4439
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-11-04 20:28:00 +00:00
mtklein
a4a4488a4c skrpb: evaluate color filters for constant shaders once.
The simplest thing to do here is just run shader+color filter pipeline at
construction time to create a new constant color shader (replacing the paint
color).

This reduces a pipeline like:
  - constant_color  (paint color)
  - matrix_4x5
  - clamp_a
  - load_d_foo, xfermode, lerp, store_foo
to
  - constant_color  (paint color -> matrix_4x5 -> clamp_a)
  - load_d_foo, xfermode, lerp, store_foo

To implement this all, we add a new store_f32 stage that writes SkPM4f, and
finally get around to implementing Sk8f::Store4() (store while reinterlacing).
Sk4f::Store4() already exists for both SSE and NEON.

Next step: reduce simple constant_color -> store pipelines (src mode, full
coverage) into non-pipeline memsets.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2480823002

Review-Url: https://codereview.chromium.org/2480823002
2016-11-04 13:20:07 -07:00
caryclark
d8db392be9 use reversePathTo in place of addPathReverse
Path ops was using addPathReverse, instead of reversePathTo.
The former adds a moveTo always, and the latter requires
that the caller add the moveTo if needed.

Simplify the reversePathTo implementation.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2481463002

Review-Url: https://codereview.chromium.org/2481463002
2016-11-04 11:38:41 -07:00
fmalita
8bd45cd98e Deferred image generator subsetting
Instead of invoking the generator at subset time, instantiate a new
SkImage_Generator with its own cacherator but shared generator.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2462013003

Review-Url: https://codereview.chromium.org/2462013003
2016-11-04 11:36:31 -07:00
bsalomon
795390bd88 Improvements to build_command_buffer.py
Remove subdir thing for Linux. It's incorrect.

Make the script able to take extra GN args.

Default to a custom gn output dir for the command buffer build.

Default to a release build of the command buffer.

Document that the script overwrites the gn args on each run.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472343003

Review-Url: https://codereview.chromium.org/2472343003
2016-11-04 10:54:54 -07:00
Ben Wagner
255095866b PixelC is also TegraX1, but doesn't have GL.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4397
CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Release-GN_Android-Trybot,Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android-Trybot,Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android-Trybot,Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android-Trybot,Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android-Trybot,Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android-Trybot
NOTRY=true

Change-Id: I60a03f2b515cd2a7f1e3a00e4ed33985a5d4347d
Reviewed-on: https://skia-review.googlesource.com/4397
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2016-11-04 17:00:00 +00:00
Hal Canary
342b7acc46 tests: s/SkAutoTUnref/sk_sp/
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4394

Change-Id: I088b3c6e2adff07abed1e8a50091cc0ec4a4109c
Reviewed-on: https://skia-review.googlesource.com/4394
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-04 16:55:38 +00:00
Ben Wagner
d49128ab8e Add note about CQ_INCLUDE_TRYBOTS and -Trybot suffix.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4428
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=4428

Change-Id: I5f1fc4ad1cca50ed245d5c14ceff28aa7dfaee53
Reviewed-on: https://skia-review.googlesource.com/4428
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2016-11-04 16:45:11 +00:00
Matt Sarett
1a85ca5c90 Fix color xforms for Index8 bmps
Thanks to Gold for catching this.

BUG=skia:4895

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4426

Change-Id: Icc816d933e9e2fd312858a5430fa21a47722563e
Reviewed-on: https://skia-review.googlesource.com/4426
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-11-04 16:25:27 +00:00
Brian Salomon
4d53c44aa6 Limit GL_TEXTURE_RECTANGLE filtering to bilinear.
Adds a clamp for GrTexture filtering that can be set by a subclass at construction. The clamping is performed by GrTextureParams. GrGLTexture limits filtering to bilinear for rectangle and external textures.

Also moves samplerType() to GrTexturePriv from GrTexture.

BUG=skia:5932

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4352

Change-Id: I1f023d4f4133e7eb393367580c0558257e56c8db
Reviewed-on: https://skia-review.googlesource.com/4352
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2016-11-04 16:25:25 +00:00
borenet
9598c2fbc2 Add the new buildbotless infra-tests bot to the CQ as an experiment
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2421483004

Review-Url: https://codereview.chromium.org/2421483004
2016-11-04 08:48:30 -07:00
herb
12ae597ef5 Use alignas to force alignment.
Using alignas reduces code and platform specific macros.

Use alignas instead of std::aligned_storage because it is unimplemneted
in MSVC 2015.

Here is the bug from MS:
https://connect.microsoft.com/VisualStudio/feedback/details/1559873/std-aligned-storage-cannot-align-type-with-16-byte

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468243002
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/2473143002
2016-11-04 08:41:01 -07:00
bsalomon
bab7945563 Add documentation for using testing using the command buffer
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2479833003
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2479833003

Review-Url: https://codereview.chromium.org/2479833003
2016-11-04 08:36:00 -07:00
stephana
37be4d0135 Re-enable iOS testing
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2469863009

Review-Url: https://codereview.chromium.org/2469863009
2016-11-04 08:35:56 -07:00
Ben Wagner
c05b2bf3d2 Clarify onCreateScalerContext failure modes.
This should not change any behavior, but addresses some readability
concerns.

Change-Id: I2614beaed7b5722a3af2c49ab8f4ac16b56aa3a7
Reviewed-on: https://skia-review.googlesource.com/4393
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-04 15:35:53 +00:00
Robert Phillips
ccd3c8937f Further centralize computation of GrSurface VRAM consumption
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4383

Change-Id: I054b74f2cd15f904f8e05af0fda58d6e8a523eb9
Reviewed-on: https://skia-review.googlesource.com/4383
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-04 15:35:51 +00:00
fmalita
544da7a7c3 Avoid matrix inverse in SkBitmapProcInfo::init for translate-only cases
If fInvMatrix doesn't have a scale component, the
really-close-to-no-scale logic is a no-op.  We can avoid an inverse op
by hoisting the check out of just_trans_clamp/just_trans_general.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472003004

Review-Url: https://codereview.chromium.org/2472003004
2016-11-03 14:43:53 -07:00
Hal Canary
1b612a89fb tools: s/SkAutoTUnref/sk_sp/
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4391

Change-Id: Iae8b032b00d3579c77f3b86370dde71c4649da45
Reviewed-on: https://skia-review.googlesource.com/4391
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-03 21:00:34 +00:00
Matt Sarett
1b96c6f913 Add F16, SkColorSpaceXform support to SkBmpCodec
BUG=skia:4895

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4390

Change-Id: I9cb727e7f13816b0ac882f62ec635a4528c3a524
Reviewed-on: https://skia-review.googlesource.com/4390
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-11-03 20:58:13 +00:00
Mike Klein
6e437b7d17 more const SkOSMenus.
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Mac-Clang-Arm7-Debug-iOS-Trybot

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4351

Change-Id: I71f77aaad36701eca7a013959e751a843c6f5e3d
Reviewed-on: https://skia-review.googlesource.com/4351
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-03 20:48:07 +00:00
Ben Wagner
68057332d0 Remove SkAutoUnref.
It is no longer used.

Change-Id: Ie2f9a39a4295005cb39bdf2f8fc15542ee75d207
Reviewed-on: https://skia-review.googlesource.com/4386
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-03 19:58:05 +00:00
Mike Reed
faba3715b8 remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAM
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4384

Change-Id: I5121acd027d935ade169ff65941f29f654a47bd0
Reviewed-on: https://skia-review.googlesource.com/4384
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-03 19:54:08 +00:00
Brian Salomon
8b1fb741f1 Make more tests exercise rendertargetless textures.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4322

Change-Id: I442041cd5d74768f0981eedcc17be7256e0e0b37
Reviewed-on: https://skia-review.googlesource.com/4322
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-03 19:51:26 +00:00
Ben Wagner
12e8dc256d Fix iOS and Angle builds.
"Remove SkAutoTDelete." did not run trybots on these specific bots.

Change-Id: Ibfa731df387a90a78187b88c75483800981a691c
Reviewed-on: https://skia-review.googlesource.com/4387
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-03 19:45:29 +00:00
Mike Klein
7d3028818e GN: iOS basics
This doesn't create any apps or bundles or sign anything, but it all compiles and links.

Note the awkward transitional hack I used to make each tool's tool_main() serve as the real main() again when built with GN, while keeping the existing setup with GYP.  Fun...

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4350

Change-Id: I632753d5d8e5848380854f413bf5905d676bfcf4
Reviewed-on: https://skia-review.googlesource.com/4350
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 19:31:50 +00:00
Matt Sarett
4ef986db65 Write transparent pixels more often in SkGifImageReader
This stems from a behavior difference between Skia and Chrome.
In Skia, we want to write transparent pixels as often as possible.
(It's faster than checking if we should skip each pixel.)
In Chrome, they avoid writing transparent pixels unless
absolutely necessary.

We were cautious about changing behavior when this first landed,
but this is easier to think about in a smaller change (right now).
(1) We can always write transparent pixels when we are writing
    an independent frame.
(2) There is no need for the progressiveDisplay() check.  We
    only ever use progressive display methods on the first
    frame - and the first frame is always independent.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4379

Change-Id: I82048a08e2003aac216f483c7db8df997b687149
Reviewed-on: https://skia-review.googlesource.com/4379
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-11-03 19:25:39 +00:00
Mike Klein
f0348c2413 Implement SkNx_fma() for Sk4f on ARMv8.
I was looking at the disassembly of matrix_4x5() and noticed it didn't have any FMAs.  This makes things that call SkNx_fma() actually use the FMA instruction.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4400
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: Ia353a77b0ca14385a43b564997b05586f9472996
Reviewed-on: https://skia-review.googlesource.com/4400
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 19:09:17 +00:00
Ben Wagner
145dbcd165 Remove SkAutoTDelete.
Replace with std::unique_ptr.

Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-03 19:03:40 +00:00
fmalita
b1c7f88df9 Fix kMediumQuality invMatrix setup for sizes == mip levels
When downscaling with kMediumQuality in non-clamp mode, if we happen to hit a size == mip level, then SkBitmapProcInfo::init takes the trivial matrix path and doesn't set up a matrix for normalized coords on the assumption that we're going to ignore the transform.  But kMediumQuality disables allow_ignore_fractional_translate, so we take the filter path after all - but with an incorrect matrix.

R=reed@google.com
BUG=chromium:661180
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2476713002

Review-Url: https://codereview.chromium.org/2476713002
2016-11-03 11:42:49 -07:00
liyuqian
bdabcc4cb8 Fix quad convexity with only one backward dir
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2465253008

Review-Url: https://codereview.chromium.org/2465253008
2016-11-03 11:40:19 -07:00
Mike Klein
6b059bdc40 Remove sk_linear_to_srgb_noclamp().
We've just re-noticed this can happen:
  1) we have a properly premultiplied linear color;
  2) we convert that to sRGB;
  3) we convert that back to linear;
  4) that color does not appear to be premultiplied.

Removing sk_linear_to_srgb_noclamp(), and thus always clamping to [0,1] here in linear space, does not fix this problem.  However, it does help keep it from propagating too badly.

Just double-checked: the older Sk4f pipeline (SkXfermode4f, SkPM4fPriv, etc) already use sk_linear_to_srgb() exclusively, so they're already doing this same clamp.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4314

Change-Id: I6352eb0ba969eb25674e8441e43bb51e1e1c0df3
Reviewed-on: https://skia-review.googlesource.com/4314
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 18:22:54 +00:00
Brian Salomon
71d9d84d6c Use temporary FBO for GrGLGpu::onReadPixels.
Allow configs to be supported as FBO attachments for copies/readbacks without being "renderable" elsewhere in Ganesh.

The motivation for this is to add support for int textures as srcs but not as dsts (at least initially) but to still be able to read them back. This means we don't pay for a unneeded GPU copy when reading back a GrSurface that is a GrTexture and not a GrRenderTarget.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4345

Change-Id: I824a73c6b8c1b9634206d76ccf0848d5f9b64441
Reviewed-on: https://skia-review.googlesource.com/4345
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-03 18:06:37 +00:00
Mike Klein
89eda8a5e3 Streamline skia.h construction.
This moves the work of finding headers from `gn gen` time into the action itself.  We can do this safely now because we're constructing a skia.h.d deps file, which Ninja uses to track if-these-are-dirty-then-this-is-dirty relationships.  Everything can now live in one handy find_headers.py.

Upshot is, `gn gen` runs ~50ms faster, and I think the code's clearer this way too.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4065

Change-Id: I2f1e7adf68be8e961eb77596786a795134bbb9a6
Reviewed-on: https://skia-review.googlesource.com/4065
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 17:28:39 +00:00
Matt Sarett
6193568fed Revert "Add F16, SkColorSpaceXform support to SkBmpCodec"
This reverts commit d851795e79.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add F16, SkColorSpaceXform support to SkBmpCodec
> 
> BUG=skia:4895
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300
> 
> Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789
> Reviewed-on: https://skia-review.googlesource.com/4300
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

Speculative revert for MSAN

TBR=borenet@google.com,msarett@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie48c03c0c3156267763fbcf96818477567c5069d
Reviewed-on: https://skia-review.googlesource.com/4378
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2016-11-03 17:27:27 +00:00
Mike Klein
6686617001 Basic pipeline blend mode strength reductions:
- when the shader is opaque, srcover becomes src
  - don't load dst when blitting in src mode with full coverage
  - fold coverage into src alpha when in srcover mode

It's not obvious that we can fold coverage into src alpha when using a 565 mask, so I've not attempted that.  What would we do about alpha?

Over all GMs this causes a single 1-bit difference in sRGB mode.  No 565 or f16 diffs.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4349
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: Ib9161f498c4efa6b348ca74522166da64d09a7da
Reviewed-on: https://skia-review.googlesource.com/4349
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 17:15:15 +00:00
Mike Reed
37d1b49ae8 add include to remove legacy flag
BUG=skia:

NOTRY=True

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4377

Change-Id: Ie3b173188041a8c37fc2252d257c1f3e1c2a4c84
Reviewed-on: https://skia-review.googlesource.com/4377
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-03 17:14:29 +00:00
Robert Phillips
29e52f13f6 Centralize computation of GrRenderTarget & GrTexture VRAM consumption
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4310

Change-Id: I676749ecf1e489f825799b619a15a45fc7dcd219
Reviewed-on: https://skia-review.googlesource.com/4310
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-03 16:44:50 +00:00
Matt Sarett
d851795e79 Add F16, SkColorSpaceXform support to SkBmpCodec
BUG=skia:4895

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300

Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789
Reviewed-on: https://skia-review.googlesource.com/4300
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-11-03 16:33:33 +00:00