Commit Graph

6777 Commits

Author SHA1 Message Date
Robert Phillips
67c18d6b51 Continue making Ganesh use absolute texture coordinates - take 2
The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix)

Relanding of: https://skia-review.googlesource.com/c/6977/


Change-Id: Ibc9b9e354f7fc23b1a6e6e4fe7c9fe3cef771c02
Reviewed-on: https://skia-review.googlesource.com/7265
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-20 18:18:18 +00:00
Brian Salomon
f833215420 Make it possible to query GrXPFactory for dst texture without GrPipelineAnalysis.
Change-Id: I8c140eb4e3e5f2d21ecbf8f8f3c8533dc7f50e7c
Reviewed-on: https://skia-review.googlesource.com/7316
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-01-20 17:20:34 +00:00
Robert Phillips
77505da160 Remove GrTestTarget
Change-Id: I4d2e1aa54732ff75b44a197255035c0e04548219
Reviewed-on: https://skia-review.googlesource.com/7327
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-20 16:47:34 +00:00
Greg Daniel
80a08dd2e5 Fix Vulkan crashes on nexus player
This CL enables Vulkan Test bots on the NexusPlayer

TBR:bsalomon@google.com
BUG=skia:

Change-Id: I0cc8b01107afcc84e0cb0631f361f3615fc8dd9b
Reviewed-on: https://skia-review.googlesource.com/5681
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-01-20 16:19:02 +00:00
Robert Phillips
c37e61455d Rename GrContext::getFontAtlas to getFontAtlas_ForTesting
A trivial change but it does better indicate the nature of the method

Change-Id: I44a0e77dba28df892f4200496d78797ed5fd37df
Reviewed-on: https://skia-review.googlesource.com/7331
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-20 15:54:54 +00:00
Greg Daniel
48f770c43f Remove unused asACustomShader function from SkShader
I recentely removed the only call site of this so it should be
safe to delete now.

BUG=skia:

Change-Id: Id7fa94b9af5d73c4f7bb5e5a657d6fc6728923b5
Reviewed-on: https://skia-review.googlesource.com/7330
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-01-20 15:21:05 +00:00
Joe Gregorio
c485907f04 Revert "explictly fail to draw unpremul, as this is buggy, incomplete, tricky, and unused"
This reverts commit 1baaacac74.

Reason for revert: Failing the roll: https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/3868/layout-test-results/results.html

Original change's description:
> explictly fail to draw unpremul, as this is buggy, incomplete, tricky, and unused
> 
> BUG=skia:
> 
> Change-Id: Ie9da6015cc4955c0f27f6db53fc6ae532e0132f4
> Reviewed-on: https://skia-review.googlesource.com/7304
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
> 

TBR=bsalomon@google.com,msarett@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ifc808a430b8afe4fef6df3775c2bfdcede1a2dd7
Reviewed-on: https://skia-review.googlesource.com/7329
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2017-01-20 14:21:42 +00:00
Ethan Nicholas
de4d301881 Replaced all calls to fragmentPosition() with sk_FragCoord
BUG=skia:

Change-Id: I179576e148ea6caf6e1c40f0a216421898bcb35d
Reviewed-on: https://skia-review.googlesource.com/5941
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-19 22:36:26 +00:00
Matt Sarett
5bee0b6de6 Reland "Respect full precision for RGB16 PNGs" (part 2)
This lands all the new xform hooks but no change to src/codec.
So the new decode features are turned off.

I'm relanding this in pieces to try to bisect a
strange MSAN error.

Original CL:
https://skia-review.googlesource.com/c/7085/

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-x86_64-Release-Fast


Change-Id: I451a2a29c73ca475e9e7a5ded58d4948d6b8be19
Reviewed-on: https://skia-review.googlesource.com/7277
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-19 22:08:52 +00:00
Mike Reed
1790f8ea09 Revert "Revert "move device headers to core""
This reverts commit d4bdee5f2c.

BUG=skia:

Change-Id: If5c316f8585881e43321412a2a38f97fd4aa5f02
Reviewed-on: https://skia-review.googlesource.com/7315
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-19 21:51:29 +00:00
Mike Reed
4f364fd951 remove clipstack from lua -- deprecated
BUG=skia:

Change-Id: I7974b5921aeeabc9c58fdf76731d80b8f0702a70
Reviewed-on: https://skia-review.googlesource.com/7309
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-19 20:07:03 +00:00
Mike Reed
1baaacac74 explictly fail to draw unpremul, as this is buggy, incomplete, tricky, and unused
BUG=skia:

Change-Id: Ie9da6015cc4955c0f27f6db53fc6ae532e0132f4
Reviewed-on: https://skia-review.googlesource.com/7304
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-01-19 19:26:21 +00:00
Mike Reed
3726a4ac68 new hacky api to get cliprgn for android
BUG=skia:

Change-Id: I42711a474906084adb3c888a599ae02505726484
Reviewed-on: https://skia-review.googlesource.com/7220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-19 18:31:28 +00:00
Heather Miller
c5a37f642a Update Skia milestone to 58
BUG=skia:

Change-Id: I01bc472558f8ff77b6de3f42958dafeb78b9b511
Reviewed-on: https://skia-review.googlesource.com/7272
Commit-Queue: Heather Miller <hcm@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
2017-01-19 16:56:11 +00:00
Mike Reed
2a83603541 remove metadata from device
BUG=skia:

Change-Id: I46eaea4ddc103bb490b327a52fc5b3ce592c6670
Reviewed-on: https://skia-review.googlesource.com/7240
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-19 14:16:39 +00:00
Brian Salomon
92ce594685 Add class GrProcessorSet which represents color and coverage FPs and a XPFactory.
Eventually ops can use this to hold their ops and create GrPipelines at flush time.

For now it is used by GrPipelineBuilder.

Change-Id: I0db3892032f2d07238e4c847a790678b3aab456f
Reviewed-on: https://skia-review.googlesource.com/7132
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-18 16:48:41 +00:00
Robert Phillips
2c86249465 Move read/write-Pixels up to GrSurfaceContext
This still needs to be propagated out in several ways:
  replace more instances of GrSurface::read/write-Pixels
  add colorSpace to more instances of the TextureContext

but it establishes a beach-head and is exciting enough as is.

Change-Id: If86035aa0245e70b54541e83722b3c75bc5ade13
Reviewed-on: https://skia-review.googlesource.com/7172
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-18 16:22:59 +00:00
Matt Sarett
dfff166db5 Revert "Respect full precision for RGB16 PNGs"
This reverts commit 7a090c403d.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Respect full precision for RGB16 PNGs
> 
> BUG=skia:
> 
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
> 
> Change-Id: If58d201daae97bce2f8efbc453c2ec452e682493
> Reviewed-on: https://skia-review.googlesource.com/7085
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=mtklein@chromium.org,mtklein@google.com,msarett@google.com,scroggo@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ibd9879bc4f65ca0c2457dd0bfb5eb008d9a8f672
Reviewed-on: https://skia-review.googlesource.com/7183
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-01-18 16:13:42 +00:00
Matt Sarett
7a090c403d Respect full precision for RGB16 PNGs
BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: If58d201daae97bce2f8efbc453c2ec452e682493
Reviewed-on: https://skia-review.googlesource.com/7085
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-18 15:56:34 +00:00
Mike Reed
d4bdee5f2c Revert "move device headers to core"
This reverts commit 98420d0c9b.

Reason for revert: <INSERT REASONING HERE>

blink_headless ImageBufferSurface.cpp

Original change's description:
> move device headers to core
> 
> CANNOT LAND until we update lots of call-sites
> 
> BUG=skia:
> 
> Change-Id: Ibb957dbbf5baf2a2920887e48c03709d1f6c51e1
> Reviewed-on: https://skia-review.googlesource.com/6982
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> 

TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I11f108137ed0a8efd553af6ea6039904cf3a3870
Reviewed-on: https://skia-review.googlesource.com/7161
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-18 00:05:02 +00:00
Mike Reed
98420d0c9b move device headers to core
CANNOT LAND until we update lots of call-sites

BUG=skia:

Change-Id: Ibb957dbbf5baf2a2920887e48c03709d1f6c51e1
Reviewed-on: https://skia-review.googlesource.com/6982
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-01-17 21:11:46 +00:00
Joe Gregorio
a7d61a65ee Revert "Continue making Ganesh use absolute texture coordinates"
This reverts commit 4493a9dc9d.

Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410

Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de
Reviewed-on: https://skia-review.googlesource.com/7125
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2017-01-17 19:50:55 +00:00
Robert Phillips
4493a9dc9d Continue making Ganesh use absolute texture coordinates
The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix) 

Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8
Reviewed-on: https://skia-review.googlesource.com/6977
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-17 17:28:58 +00:00
Brian Salomon
aab259ea9e Simplify GrProcOptInfo initialization.
Removes unused single channel tracking.

Makes it so that only the op/gp can initiate lcd coverage.

Makes GrProcOptInfo fragment processor analysis continuable.

Change-Id: I003a8aa3836bb64d04b230ddee581dc500e613a9
Reviewed-on: https://skia-review.googlesource.com/7039
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-17 16:15:00 +00:00
Mike Reed
46784be70c hide getClipStack
BUG=skia:6122

Change-Id: I0aca03b349541174ced019f4f2116e0015c980c4
Reviewed-on: https://skia-review.googlesource.com/7097
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-17 16:10:57 +00:00
Jim Van Verth
2103cf0ff0 Split ShadowMaskFilter into separate ambient and spot mask filters
This does not change the public API.

BUG=skia:6119

Change-Id: Ibdcd2f8611bc2eec332d8a65e5d51246b89a0a90
Reviewed-on: https://skia-review.googlesource.com/7083
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-16 18:40:59 +00:00
Herb Derby
ac04fef619 Remove SkFallbackAlloc and SkFixedAlloc.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN;skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

TBR=reed@google.com

Change-Id: I1000dc9ed8ad65b249798759d9af99f47fc237d2
Reviewed-on: https://skia-review.googlesource.com/6809
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-01-16 17:01:57 +00:00
Mike Reed
986480a71f Revert "move SkDevice.h and SkBitmapDevice.h contents in to src headers"
This reverts commit 2f719a6b92.

Reason for revert: <INSERT REASONING HERE>

swf/transform/jsrunner/swiffy_canvas.h

caller included SkDevice.h, but really wanted SkBitmap and SkColor

Original change's description:
> move SkDevice.h and SkBitmapDevice.h contents in to src headers
> 
> BUG=skia:
> 
> Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912
> Reviewed-on: https://skia-review.googlesource.com/7082
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
> 

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

Change-Id: I40f7f1e4ad62685facdd39492da7a0b105178221
Reviewed-on: https://skia-review.googlesource.com/7087
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-13 22:43:33 +00:00
Mike Reed
2f719a6b92 move SkDevice.h and SkBitmapDevice.h contents in to src headers
BUG=skia:

Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912
Reviewed-on: https://skia-review.googlesource.com/7082
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-13 21:57:50 +00:00
Herb Derby
4fa20cea81 Fix syntax error for adjusting old stdc++ headers.
Change-Id: Ibc99ae943b275b770e8767b80400b8e1520e70a5
Reviewed-on: https://skia-review.googlesource.com/7035
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-01-13 21:26:03 +00:00
Brian Osman
d9b6abb1a1 Remove (unused) YUV API from SkPixelRef
YUV conversion happens via SkImage now.

BUG=skia:

Change-Id: I6e1fa18effb72cbb00a173a346769b873e372c40
Reviewed-on: https://skia-review.googlesource.com/7034
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-13 20:40:11 +00:00
Jim Van Verth
43475ad9dc Move Android shadow rendering interface to util library.
BUG=skia:6119

Change-Id: I8318cf2758042ffd0c81c5fa74240acbf7bea61f
Reviewed-on: https://skia-review.googlesource.com/6999
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-13 20:09:02 +00:00
Brian Salomon
d4652ca1b7 Remove most modifiers of processors on GrPipelineBuilder
Change-Id: I2fc12a97d694e5c0d86c9a4e0818a058905c8cf0
Reviewed-on: https://skia-review.googlesource.com/6993
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-13 20:08:16 +00:00
Herb Derby
0497f088bb Introduce SkArenaAlloc - should be fast for POD types and RAII for types with dtors.
- Implementation.
- Use in SkLinearPipeline.

TBR=mtklein@google.com

Change-Id: Ie014184469b217132b0307b5a9ae40c0c60e5fc9
Reviewed-on: https://skia-review.googlesource.com/6921
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-01-13 18:45:19 +00:00
Brian Salomon
6f1d36cc54 Delay SkPaint->GrPaint conversion in text rendering.
This fixes an issue where color filters aren't correctly applied to color glyphs. Instead we apply the filter to the SkPaint's color which is correct for mask glyphs only.

Add color filter and alpha + various effects to coloremoji gm

Change-Id: If77dece71d43468fec65499857eaaaedb56428e9
Reviewed-on: https://skia-review.googlesource.com/6891
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-01-13 17:38:10 +00:00
Florin Malita
0ed3b640c9 Revert "Revert "Hide SkCanvas getDevice() & getTopDevice()}""
This reverts commit e050ca7832.

Reason for revert: Chromium change is sticking, revert not needed.

Change-Id: Ic3004460606e4c512f79ba0923746706b960881a
Reviewed-on: https://skia-review.googlesource.com/7021
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@google.com>
2017-01-13 17:30:19 +00:00
Robert Phillips
70b49fd063 Minor Ganesh refFoo cleanup
Change-Id: I2c66693c280225795a5d36ccc0391fcd4056420d
Reviewed-on: https://skia-review.googlesource.com/6995
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-13 17:15:18 +00:00
Robert Phillips
75a475cf2e Try out refFoo pattern on GrRenderTargetContext
Change-Id: Ifae5618f30c2202b9083f479b58556709ff6126a
Reviewed-on: https://skia-review.googlesource.com/6990
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-13 16:09:34 +00:00
Florin Malita
e050ca7832 Revert "Hide SkCanvas getDevice() & getTopDevice()}"
This reverts commit 76467a11a0.

Reason for revert: we may need to revert the Chromium GDI change.

Original change's description:
> Hide SkCanvas getDevice() & getTopDevice()}
> 
> No longer used externally.
> 
> R=reed@google.com
> 
> Change-Id: I450148010852c2567d136d2c85c8837c6dcbc6b9
> Reviewed-on: https://skia-review.googlesource.com/6974
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> 

TBR=fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: If8480aa5d36ff843c28409a5c94d51570ba0fc1c
Reviewed-on: https://skia-review.googlesource.com/6991
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2017-01-13 15:13:23 +00:00
Florin Malita
76467a11a0 Hide SkCanvas getDevice() & getTopDevice()}
No longer used externally.

R=reed@google.com

Change-Id: I450148010852c2567d136d2c85c8837c6dcbc6b9
Reviewed-on: https://skia-review.googlesource.com/6974
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-01-13 14:09:20 +00:00
Yuqian Li
aeef5610d7 Revert "Reland https://skia-review.googlesource.com/c/6091/"
This reverts commit b46fff60bc.

Reason for revert: possible chromium cc unit tests failure

Change-Id: Ie174c55e4d0fc3ae45854b5897ba26b7ad5a9c13
Reviewed-on: https://skia-review.googlesource.com/6981
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2017-01-13 00:37:20 +00:00
Matt Sarett
379938e47b Use RasterPipeline to support full precision on 16-bit RGBA pngs
Reland of Original Change:
https://skia-review.googlesource.com/6260

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I809984dd9af225103bfbe83492a17c19da7c5e40
Reviewed-on: https://skia-review.googlesource.com/6980
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-13 00:12:49 +00:00
Yuqian Li
b46fff60bc Reland https://skia-review.googlesource.com/c/6091/
The only difference is that we now put the guard flag SK_SUPPORT_LEGACY_AAA in
SkUserConfig.h instead of SkScan.h. Previously, SkAnalyticEdge.cpp doesn't get
that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I7b89d3cb64ad71715101d2a5e8e77be3a8a6fa16
Reviewed-on: https://skia-review.googlesource.com/6972
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-01-12 21:13:20 +00:00
Matt Sarett
25b60833e7 Revert "Use RasterPipeline to support full precision on 16-bit RGBA pngs"
This reverts commit bb2339da39.

Reason for revert: Breaks MSAN

Original change's description:
> Use RasterPipeline to support full precision on 16-bit RGBA pngs
> 
> TODO: Support more precision on 16-bit RGB pngs
> 
> BUG=skia:
> 
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
> 
> Change-Id: I89dfef3b4887b9c4895c17309933883ab90ffa4d
> Reviewed-on: https://skia-review.googlesource.com/6260
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

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

Change-Id: I47579c20af033a75883e2b35567cb9c690ce54b0
Reviewed-on: https://skia-review.googlesource.com/6975
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-01-12 21:03:28 +00:00
Hal Canary
3d97a0e2ad rm -r {include,src}/animator
Change-Id: Ibfb57dfa7fd317fb0737096cc7c1bbcb644421b5
Reviewed-on: https://skia-review.googlesource.com/6957
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-12 19:52:18 +00:00
Hal Canary
5aedd6d5a3 cleanup after 95e3c05
Change-Id: Ifd194fd009196b8bee2dd83328bbe698586d72f4
Reviewed-on: https://skia-review.googlesource.com/6965
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-01-12 19:49:46 +00:00
Matt Sarett
bb2339da39 Use RasterPipeline to support full precision on 16-bit RGBA pngs
TODO: Support more precision on 16-bit RGB pngs

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I89dfef3b4887b9c4895c17309933883ab90ffa4d
Reviewed-on: https://skia-review.googlesource.com/6260
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-12 19:09:49 +00:00
Mike Reed
693fdbd6b8 refFoo variant for getters that naturally have a sk_sp
BUG=skia:

Change-Id: I13afa1b81e8a72d93e45fb4d37228be196b0f388
Reviewed-on: https://skia-review.googlesource.com/6923
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-12 16:38:34 +00:00
Brian Osman
78f20e0e97 Cleanup GrPixelConfig helper functions
Remove unused functions, and convert another to switch style.

BUG=skia:

Change-Id: I93edbece54f147d868801bb008e6f935a8cb997f
Reviewed-on: https://skia-review.googlesource.com/6947
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-12 16:22:06 +00:00
Brian Osman
0c2997b6d8 Remove second version of SkImageInfo2GrPixelConfig
Alpha type is not (and never will be) part of pixel config, so the logic
around that was unnecessary. (Also, we already sanitize color type and
alpha type before making a new device at a higher level).

With that out of the way, we can easily supply a full info at the two
call-sites that were using the other version.

BUG=skia:

Change-Id: Iceccdbdebd1062d3e5023620755aabcc86604d2f
Reviewed-on: https://skia-review.googlesource.com/6920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-12 14:31:31 +00:00
Brian Osman
d0be1ef36c Remove kIndex_8_GrPixelConfig
It's been disabled for a long time (GPUs don't support it, and it actually
caused performance regression in testing).

BUG=skia:4333

Change-Id: I6e2bf755f765168fd616de6c9c023c6fbd5abd20
Reviewed-on: https://skia-review.googlesource.com/6897
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-12 14:29:39 +00:00
Brian Salomon
f046e15347 Fix undefined GrIORef test method on Chrome win bot
Change-Id: Ifc3d7e285a4b1a0b370ec79963127490bd7b1a84
Reviewed-on: https://skia-review.googlesource.com/6896
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-11 21:11:12 +00:00
Brian Salomon
82f4431915 Make GrPaints move their GrProcessor ownership into GrPipelineBuilder.
This makes GrPaints usable only once. In some places we must make copies in order to issue draws with the same paint state.

Change-Id: Ie816e5185ce93a064111cad64c6880e1e21184c2
Reviewed-on: https://skia-review.googlesource.com/6844
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-11 19:56:48 +00:00
Mike Reed
ab273facbf move SkTRegister.h into tools
BUG=skia:

Change-Id: Ie7d4fac3024b361a281f456fec2b3a837e2bfe43
Reviewed-on: https://skia-review.googlesource.com/6881
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-11 19:53:36 +00:00
Ben Wagner
20d031a6ad Remove SK_LEGACY_FONTMGR_FACTORY.
SkFontMgr factories now return sk_sp and the legacy factories are no
longer used and can be removed.

BUG=skia:5077

Change-Id: Ieaff8555b297d1db157f8b78cdd6e7d07a3b5490
Reviewed-on: https://skia-review.googlesource.com/6894
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-11 19:50:14 +00:00
Hal Canary
95e3c058ef SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).

  * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h

  * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"

Revert "Revert 'SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h'"
This reverts commit c456b73fef.

Change-Id: Ie2c1a17c20134b8ceab85a68b3ae3e61c24fbaab
Reviewed-on: https://skia-review.googlesource.com/6886
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-11 18:55:34 +00:00
Kevin Lubick
c456b73fef Revert "SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h"
This reverts commit a5494f1170.

Reason for revert: Broke Google3

Original change's description:
> SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
> 
>   * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).
> 
>   * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h
> 
>   * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"
> 
> Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88
> Reviewed-on: https://skia-review.googlesource.com/4543
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
> 

TBR=halcanary@google.com,bungeman@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie8bd176121c3ee83c110d66c0d0ac65e09bfc9c5
Reviewed-on: https://skia-review.googlesource.com/6884
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2017-01-11 17:22:12 +00:00
Brian Salomon
bc6b99d22e Add test for processor->resource ref/io counts
Change-Id: I63a8cb9f1564bfc15ef98121b77946a647c79f32
Reviewed-on: https://skia-review.googlesource.com/6814
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-11 16:01:07 +00:00
Hal Canary
a5494f1170 SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).

  * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h

  * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"

Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88
Reviewed-on: https://skia-review.googlesource.com/4543
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-11 15:36:45 +00:00
Mike Reed
db52cf3b04 move SkDraw.h to core
BUG=skia:

Change-Id: Ic8c949530414f3f8d7caded969941dc853a06271
Reviewed-on: https://skia-review.googlesource.com/6845
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-11 04:22:52 +00:00
Brian Osman
986563bcff Add Gray8 pixel config
This is still just linear (non-sRGB), but adding sRGB will
be the next step. I've verified that this is really making
R8 textures when uploading Gray8 bitmaps. Tests pass, and
the all_bitmap_configs GM still renders correctly (unlike
when we just mapped Gray8 to Alpha8).

This adds another pixel config, which could grow our cache
footprint, but the benefits of not using 4bpp for 1bpp data
should outweigh that?

Re-land of https://skia-review.googlesource.com/c/6817/,
with fixes for Vulkan.

BUG=skia:6110

Change-Id: Ia763c276808be28027ed0005ee4b88637306583f
Reviewed-on: https://skia-review.googlesource.com/6839
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-10 20:37:09 +00:00
Hal Canary
7243f490a8 Remove last of SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS
Approval from https://review.skia.org/5006
TBR=reed@google.com
Change-Id: Icdd54be420260ecd2f94f2f1fa76caba34e6a50e
Reviewed-on: https://skia-review.googlesource.com/6840
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-10 19:36:17 +00:00
Brian Osman
4641d7d055 Revert "Add Gray8 pixel config"
This reverts commit f2956459f7.

Reason for revert: GM and image failures on some bots (rendering red, not gray).

Original change's description:
> Add Gray8 pixel config
> 
> This is still just linear (non-sRGB), but adding sRGB will
> be the next step. I've verified that this is really making
> R8 textures when uploading Gray8 bitmaps. Tests pass, and
> the all_bitmap_configs GM still renders correctly (unlike
> when we just mapped Gray8 to Alpha8).
> 
> This adds another pixel config, which could grow our cache
> footprint, but the benefits of not using 4bpp for 1bpp data
> should outweigh that?
> 
> BUG=skia:6110
> 
> Change-Id: I4fc4c2479fc25f1d278e174a9bb5b542a0cb184c
> Reviewed-on: https://skia-review.googlesource.com/6817
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

Change-Id: I95a4fc0450a569d5791f6bceb7fae61c7e5eba61
Reviewed-on: https://skia-review.googlesource.com/6838
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-10 18:47:38 +00:00
Hal Canary
dc11f9810c Clean up unused SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS code
Approval from https://review.skia.org/5006
TBR=reed@google.com

Change-Id: Ie630a3f45a830c8c2dc80a30e759d9481b8d60a5
Reviewed-on: https://skia-review.googlesource.com/5775
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-10 18:01:39 +00:00
Mike Reed
356f7c2600 support external raster handles
draft CL for chrome: https://codereview.chromium.org/2618323005/

BUG=skia:

Change-Id: I5dbcd700818776a9f62f1e10723d2efcc248dc44
Reviewed-on: https://skia-review.googlesource.com/6406
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-10 17:31:58 +00:00
Ben Wagner
0ab977f231 Remove SkUseTestFontConfigFile.
This method and its associated globals are no longer used by any user
and can now be removed.

BUG=skia:2817

Change-Id: Ia627e2494f568a733999b980aec9284467d2640d
Reviewed-on: https://skia-review.googlesource.com/6821
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-01-10 16:20:05 +00:00
Brian Osman
f2956459f7 Add Gray8 pixel config
This is still just linear (non-sRGB), but adding sRGB will
be the next step. I've verified that this is really making
R8 textures when uploading Gray8 bitmaps. Tests pass, and
the all_bitmap_configs GM still renders correctly (unlike
when we just mapped Gray8 to Alpha8).

This adds another pixel config, which could grow our cache
footprint, but the benefits of not using 4bpp for 1bpp data
should outweigh that?

BUG=skia:6110

Change-Id: I4fc4c2479fc25f1d278e174a9bb5b542a0cb184c
Reviewed-on: https://skia-review.googlesource.com/6817
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-01-10 16:20:03 +00:00
Brian Salomon
e57194f74d Move resource ref/io manipulation from GrProgramElement to GrProcessor
Change-Id: I783e74107f7d34b57d80b843fe23ce7126b77424
Reviewed-on: https://skia-review.googlesource.com/6816
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 21:51:05 +00:00
Matt Sarett
f9436b8235 Allow constrained and unconstrained picture-images
BUG=skia:

Change-Id: Id9b7b2c82c634fec50f9a57f4b59ce0c02e0706a
Reviewed-on: https://skia-review.googlesource.com/6818
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-01-09 21:40:27 +00:00
Brian Salomon
19ae138901 Remove unused unique ID from GrProgramElement
Change-Id: I27140b378ad665c40f6edced1a655150ebd4842c
Reviewed-on: https://skia-review.googlesource.com/6800
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 19:32:20 +00:00
Brian Salomon
89cb821e9e Separate SkArithmeticImageFilter from SkXfermodeImageFilter.
Change-Id: I145eed7276456b546ca5c66bc1a0f0f74a84f138
Reviewed-on: https://skia-review.googlesource.com/6728
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 18:31:29 +00:00
Matt Sarett
e94255d456 Specify bit depth and color space in SkImage::MakeFromPicture()
BUG=skia:

Change-Id: I1d2a2b1f97557fc3e7ca6c2bdad6329f7760dbd2
Reviewed-on: https://skia-review.googlesource.com/6685
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-01-09 18:14:06 +00:00
Brian Salomon
a163392978 Revert "Revert "Removing ref counting from GrXPFactory.""
This reverts commit 003312a211.

Change-Id: Ib41065e5c356d1dd99e70fa10611ac6756c2b79d
Reviewed-on: https://skia-review.googlesource.com/6803
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 17:21:03 +00:00
Brian Salomon
003312a211 Revert "Removing ref counting from GrXPFactory."
This reverts commit a8f80de2bc.

Reason for revert: nanobench failing on windows bots, possibly others

Change-Id: Iacb8c650064a28654c165665be057377ffb02ba5
Reviewed-on: https://skia-review.googlesource.com/6802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-09 16:08:13 +00:00
Brian Salomon
a8f80de2bc Removing ref counting from GrXPFactory.
All GrXPFactory instances are static constexpr.

Change-Id: If1086b08534166201e53b3fd9379104e361eb5e6
Reviewed-on: https://skia-review.googlesource.com/6701
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 15:44:53 +00:00
Mike Reed
5cb9a4ede3 move SkBlitRow.h out of public
BUG=skia:

Change-Id: I9a9c04fdb9fcfe50d57b28fa560a9b3d5499b699
Reviewed-on: https://skia-review.googlesource.com/6734
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-08 16:08:28 +00:00
Mike Reed
ff80c2ab30 remove SkMemoryWStream -- unused externally
BUG=skia:

Change-Id: Idbc9af4e703238871f56f623cd616fb7a5e686d3
Reviewed-on: https://skia-review.googlesource.com/6727
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-08 03:06:06 +00:00
Mike Reed
c3063e54cb remove SkDebugWStream and other cleanups
BUG=skia:

Change-Id: I06c07559b24411bd8bc4cba55bd8880f56486f76
Reviewed-on: https://skia-review.googlesource.com/6729
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-01-07 21:49:07 +00:00
Brian Salomon
19f0ed5b83 Purge clip masks when they are no longer findable.
This improves memory usage when the content contains frequently changing clips implemented as masks.

BUG=chromium:676459

Change-Id: I06ea5f9fe1cff9564ea136bad9fe97f6ecd77ad9
Reviewed-on: https://skia-review.googlesource.com/6629
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-06 19:42:08 +00:00
Brian Salomon
1090da6433 Add support for tagging GrUniqueKeys with a debug string
Change-Id: Ie7d56214fdee7a19a1e8ca3869e5e4d5e72cedf8
Reviewed-on: https://skia-review.googlesource.com/6632
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-06 17:54:03 +00:00
Mike Reed
68dd8d0e08 add writePixels to SkBitmap
BUG=skia:

Change-Id: I6f4db9ddc0364d9785e0f1794d86b73e66845ea9
Reviewed-on: https://skia-review.googlesource.com/6593
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-01-04 22:05:27 +00:00
Matt Sarett
e151bdb357 Fix color space matrix hashing to avoid hashing the typemask
BUG=skia:

Change-Id: I8d4594fcf0eeebf598871bfe9203ed52460c98ce
Reviewed-on: https://skia-review.googlesource.com/6558
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-04 16:45:05 +00:00
Brian Salomon
8c852be264 Removing tracking of whether GP/FP coverage calculations are used by XP.
Remove readsCoverage from GrPipelineOptimizations

Remove kNone from GrDefaultGeoProc::Coverage

Remove kIgnoreCoverage from GrXferProcessor::OptFlags

Remove GrPipeline::fIgnoresCoverage

Change-Id: I8f0c9337ee98b9c77af1e9a8a184519ce63822d4
Reviewed-on: https://skia-review.googlesource.com/6552
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-01-04 16:37:18 +00:00
Ben Wagner
3546ff10c2 Stage SkFontMgr factories to return smart pointers.
All the SkFontMgr factories currently return bare pointers and sometimes
even document the ownership rules. Since such factories can be
implemented by external ports, the ownership rules should be explicit in
order to prevent simple reference counting issues.

Change-Id: I25b598ce0954cd473a3fb1f8adc0cb86331583ca
Reviewed-on: https://skia-review.googlesource.com/6533
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-01-04 14:51:09 +00:00
Brian Salomon
7551898f8e Make C API compatible with -Wstrict-prototypes
Change-Id: I265605e769a12a319d672c491c9ba2d89c02de7e
Reviewed-on: https://skia-review.googlesource.com/6477
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-03 17:38:35 +00:00
Hal Canary
55325b7c59 clean up non-ASCII comments
Change-Id: I07ad00133f6a938de70a94024a0ebe36c6c542bb
Reviewed-on: https://skia-review.googlesource.com/6524
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-01-03 16:29:37 +00:00
Brian Salomon
f833478191 Remove ref counting from GrOp.
Instead use std::unique_ptr to manage GrOp lifetime.

Change-Id: Ic1dc1e0ffd7254c3994221f498677af5bbf66a71
Reviewed-on: https://skia-review.googlesource.com/6479
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-01-03 15:22:16 +00:00
Brian Osman
615d66d1ae Add ImageToColorSpace helper in SkImageFilter
Share this logic among a couple filters that need it. This also fixes a
bug that showed up in the morhpology GM for GPU color space configs.

Re-land of https://skia-review.googlesource.com/c/6475/

BUG=skia:

Change-Id: If7b8d892cf89fa030bae68bdd3c03118f290f032
Reviewed-on: https://skia-review.googlesource.com/6484
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-29 18:35:44 +00:00
Mike Reed
85ff84821d remove unused ForceUnique option from makeImageSnapshot
BUG=skia:

Change-Id: I2555ceb86b597f7bb34c8fc48b3e07eb7115ea82
Reviewed-on: https://skia-review.googlesource.com/6481
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-29 16:01:42 +00:00
Brian Osman
a4cb388c0f Revert "Add ImageToColorSpace helper in SkImageFilter"
This reverts commit e02d3caab8.

Reason for revert: New logic triggers out-of-date assert. Reverting until I can fix that, too.

Original change's description:
> Add ImageToColorSpace helper in SkImageFilter
> 
> Share this logic among a couple filters that need it. This also fixes a
> bug that showed up in the morhpology GM for GPU color space configs.
> 
> BUG=skia:
> 
> Change-Id: Ic686b07aff80e58e14a86108703bfbb3cf524979
> Reviewed-on: https://skia-review.googlesource.com/6475
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> 

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

Change-Id: I00b444dfaaa9b5981f7b33b34419cf9795b52ddb
Reviewed-on: https://skia-review.googlesource.com/6480
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-29 01:24:44 +00:00
Brian Osman
e02d3caab8 Add ImageToColorSpace helper in SkImageFilter
Share this logic among a couple filters that need it. This also fixes a
bug that showed up in the morhpology GM for GPU color space configs.

BUG=skia:

Change-Id: Ic686b07aff80e58e14a86108703bfbb3cf524979
Reviewed-on: https://skia-review.googlesource.com/6475
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-29 00:28:54 +00:00
Brian Salomon
69868af684 Remove render target unique ID virtual from GrOp.
GrRenderTargetOpList now stores the IDs along side each op.

This should put us closer to using proxy IDs and not forcing early render target instantiation as many comments point towards.

Change-Id: I1ee82b01a0818a80d2bcac39fdf3a4ee7dccecc9
Reviewed-on: https://skia-review.googlesource.com/6403
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-22 21:10:48 +00:00
Brian Osman
b62ea2240f Change GPU read/write pixels API to support color space conversion
GrContext still doesn't convert, but it has the source and destination
color spaces, and call sites are supplying appropriate values where it
makes sense.

BUG=skia:

Change-Id: Ia88733125b8090776cfc9b0dc8030cce365b0b8b
Reviewed-on: https://skia-review.googlesource.com/6400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-22 16:44:56 +00:00
Mike Reed
d5733c70df remove SK_SUPPORT_LEGACY_PREROLL code
BUG=skia:

Change-Id: I608a3250882708cefc37747b462d5fa08b1e28be
Reviewed-on: https://skia-review.googlesource.com/6349
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-22 14:12:32 +00:00
Mike Reed
463c848f3b helper to convert CGImage -> SkImage
BUG=skia:

Change-Id: I07e0b8fe510d34ab541de7572cb6775478527624
Reviewed-on: https://skia-review.googlesource.com/6386
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-21 17:38:18 +00:00
Brian Salomon
09d994ecb3 Misc batch->op cleanup Part 1 of 2
Change-Id: I80f951976558a284e55386e0a368f08bd835d8ca
Reviewed-on: https://skia-review.googlesource.com/6359
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-21 16:45:40 +00:00
Brian Osman
a69f4cf0a7 Remove sk_ref_sp's misleading preprocessor define and comment
This function will always be useful. Don't make it look/feel like a
temporary hack.

BUG=skia:

Change-Id: I6506d7d51dc3b25a7dbcea4ac273f51cf05f3a89
Reviewed-on: https://skia-review.googlesource.com/6330
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-21 15:36:13 +00:00
Brian Salomon
92aee3d685 This renames methods and classes that relate to static analysis of combinations of GrDrawOps and GrPipelines.
Change-Id: I737b901a19d3c67d2ff7f95802fb4df35656beb2
Reviewed-on: https://skia-review.googlesource.com/6199
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-21 15:12:49 +00:00
Robert Phillips
f4e27f68b0 Remove getDevice_just_for_deprecated_compatibility_testing (take 2)
Change-Id: I516ba4ff1c30bb91563a50c6f2b50f6c01c96f5b
Reviewed-on: https://skia-review.googlesource.com/6346
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 22:26:57 +00:00
Brian Salomon
42ad83ac19 Rename batch->op in GrAuditTrail.
Change-Id: I68670e5ceb06716e9928ee58485d63e157c7aca7
Reviewed-on: https://skia-review.googlesource.com/6345
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-20 21:50:09 +00:00