Commit Graph

7667 Commits

Author SHA1 Message Date
Mike Reed
dd340146f1 Revert "Revert "Revert "apply codec origin in generator"""
This reverts commit 82269abfec.

Reason for revert: ios build needs include path for SkCodec.h

Original change's description:
> Revert "Revert "apply codec origin in generator""
> 
> This reverts commit 363dd988a5.
> 
> Reason for revert: pdfium fix landed
> 
> Original change's description:
> > Revert "apply codec origin in generator"
> > 
> > This reverts commit fa15877f48.
> > 
> > Reason for revert: Appears to break PDFium.
> > 
> > Original change's description:
> > > apply codec origin in generator
> > > 
> > > Bug: skia:
> > > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
> > > Reviewed-on: https://skia-review.googlesource.com/58600
> > > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > > Commit-Queue: Mike Reed <reed@google.com>
> > 
> > TBR=scroggo@google.com,reed@google.com
> > 
> > Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/60041
> > Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> > Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> 
> TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com
> 
> Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/60320
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com

Change-Id: I4c2d310521d1a678b407d30b9fe3c261c49d67bc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/60560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-17 14:29:43 +00:00
Mike Reed
82269abfec Revert "Revert "apply codec origin in generator""
This reverts commit 363dd988a5.

Reason for revert: pdfium fix landed

Original change's description:
> Revert "apply codec origin in generator"
> 
> This reverts commit fa15877f48.
> 
> Reason for revert: Appears to break PDFium.
> 
> Original change's description:
> > apply codec origin in generator
> > 
> > Bug: skia:
> > Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
> > Reviewed-on: https://skia-review.googlesource.com/58600
> > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=scroggo@google.com,reed@google.com
> 
> Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/60041
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ben Wagner <benjaminwagner@google.com>

TBR=benjaminwagner@google.com,scroggo@google.com,reed@google.com

Change-Id: I1b54a6e6e6cbda07f346ffbbc4977f9db705abcd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/60320
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-16 18:57:02 +00:00
Ben Wagner
363dd988a5 Revert "apply codec origin in generator"
This reverts commit fa15877f48.

Reason for revert: Appears to break PDFium.

Original change's description:
> apply codec origin in generator
> 
> Bug: skia:
> Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
> Reviewed-on: https://skia-review.googlesource.com/58600
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=scroggo@google.com,reed@google.com

Change-Id: Id97137d6ec39ca638c941928bae6510814b1c499
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/60041
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-10-16 18:07:42 +00:00
Mike Reed
fa15877f48 apply codec origin in generator
Bug: skia:
Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a
Reviewed-on: https://skia-review.googlesource.com/58600
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-16 17:33:22 +00:00
Derek Sollenberger
1bd76c468c Cleanup references to AHardwareBuffer to match NDK declarations.
Change-Id: Iaf796be04a5ac04873d420960238ea06294518f7
Reviewed-on: https://skia-review.googlesource.com/60240
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-10-16 17:17:11 +00:00
Cary Clark
71ff4b94e5 remove unused SkMatrix setIDiv
Unused setIDiv, untested internally.
Unused by google3, android, chromium.

R: reed@google.com
Bug: skia: 6898
Change-Id: I57101b147272ed198746afc298cc0f5a6434abe0
Reviewed-on: https://skia-review.googlesource.com/59960
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-10-16 14:30:44 +00:00
Ben Wagner
d40b3b0af1 Make SkTypeface::Style and FromOldStyle private.
These are no longer used outside of Skia, so make them private.

Change-Id: I735bb39c10553885cc6051aebddeff150ba4caa9
Reviewed-on: https://skia-review.googlesource.com/59180
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-13 15:49:18 +00:00
Mike Reed
3bd0fece5f remove dead code for getSize, getSafeSize, etc.
Bug: skia:
Change-Id: I7dcdfaa539040b95e5b62174ccd22a94212980e0
Reviewed-on: https://skia-review.googlesource.com/59442
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-13 14:03:07 +00:00
Mike Reed
f0cb7a09ab Revert "move SkMatrix anonymous affine enum to private"
This reverts commit 708ec81d7a.

Reason for revert: broke android

frameworks/base/core/jni/android/graphics/pdf/PdfEditor.cpp
frameworks/base/core/jni/android/graphics/pdf/PdfEditor.cpp:153:54: error: no member named 'kAScaleX' in 'SkMatrix'; did you mean 'kMScaleX'?
    FS_MATRIX transform = {transformValues[SkMatrix::kAScaleX], transformValues[SkMatrix::kASkewY],
                                           ~~~~~~~~~~^~~~~~~~


Original change's description:
> move SkMatrix anonymous affine enum to private
> 
> enum members aren't used by SkMatrix.h or by
> clients outside of Skia.
> 
> R: reed@google.com, bungeman@google.com
> Bug: skia:6898
> Change-Id: I6873b4106e5ffe354caf5ec18cc613910304fa13
> Reviewed-on: https://skia-review.googlesource.com/59160
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=bungeman@google.com,reed@google.com,caryclark@skia.org

Change-Id: I7fe80879e8b851c9036fc910a314129c299d82d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6898
Reviewed-on: https://skia-review.googlesource.com/59460
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-13 13:26:08 +00:00
Eric Karl
914a36b248 MakeBackendTextureFromSkImage
Creates a static function on SkImage which converts the SkImage to a
GrBackendTexture. The texture is unowned by Skia, and must be deleted
by the caller. Allows for a no-copy / no-conversion fast path if the
provided image is unowned (unique()) and texture backed.

Change-Id: I8a48f9cc39de792725cd72057d98cd1c4594daab
Reviewed-on: https://skia-review.googlesource.com/52440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-10-12 20:05:31 +00:00
Cary Clark
708ec81d7a move SkMatrix anonymous affine enum to private
enum members aren't used by SkMatrix.h or by
clients outside of Skia.

R: reed@google.com, bungeman@google.com
Bug: skia:6898
Change-Id: I6873b4106e5ffe354caf5ec18cc613910304fa13
Reviewed-on: https://skia-review.googlesource.com/59160
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-10-12 19:56:31 +00:00
Mike Reed
9b64f97776 remove dead flag
no client still defines this

Bug: skia:
Change-Id: If55dade4207108241bbb1e3d6f7515ad12d36acc
Reviewed-on: https://skia-review.googlesource.com/59083
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-12 19:23:16 +00:00
Greg Daniel
177e695589 Add flag on GrBackendTexture to say whether texture is mipped or not
Bug: skia:
Change-Id: Ia684e3daf779ec2feaaec64c04dabf5cb03cd07a
Reviewed-on: https://skia-review.googlesource.com/57821
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-12 17:02:41 +00:00
Greg Daniel
0fc4d2d269 Use enum to track MipMapsStatus throughout Texture creation
Bug: skia:
Change-Id: I1de1105d74b45f7b02ff52e6b8333801d98ef1ce
Reviewed-on: https://skia-review.googlesource.com/58501
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-12 16:12:42 +00:00
Florin Malita
1ba5b6baa8 Plumb more SkPaintFilterCanvas virtuals
SkNWayCanvas cannot support virtuals which imply one-to-one proxying,
but SkPaintFilterCanvas can (and should).

Change-Id: If966aa4ec3fcc79e6355a82cc299fd1877e4cf53
Reviewed-on: https://skia-review.googlesource.com/58842
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-10-12 15:32:11 +00:00
Mike Klein
20d479c088 abort SkRRect::transform() before dst->scaleRadii() asserts
If we've got a crazy matrix, we can make dst arbitrarily crazy.

This should fix several of Kevin's fuzzes, e.g.
Bug: skia:7090

I don't see any uses of SkRRect::transform() that care about
the output rrect in case of failure, so I've just removed the
guarantee that we don't modify it when failing.

Change-Id: I4c81af59a093a984f0a02a0d3dc4bbbb1fb935f2
Reviewed-on: https://skia-review.googlesource.com/58620
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-10-12 15:29:11 +00:00
Heather Miller
298143ebdf Update Skia milestone to 64
Bug: skia:
Change-Id: I381323606f92a5388b3fd76c232e35c492a23dc4
Reviewed-on: https://skia-review.googlesource.com/58840
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2017-10-12 14:57:31 +00:00
Stan Iliev
cd975d5aa5 Implement getGrContext in SkPaintFilterCanvas
Implement getGrContext to return the context from the original
canvas.

Bug: b/66988832
Test: Ran Android HWUI on a non overlapping View with alpha,
Change-Id: I44ad48e3257004cc5c45c86529b167139f30621a
which is using SkPaintFilterCanvas to draw.
Reviewed-on: https://skia-review.googlesource.com/58841
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-10-12 14:42:41 +00:00
Brian Salomon
0b4d8aa108 Add benchmark for comparing multitexturing to non-multitexturing image draws.
Allows benchmarks to override GrContextOptions.

Removes the ability to use the same GrContext for all benchmarks in a config.

Change-Id: I5ab9f6e81055451ac912a66537843d1a49f3b479
Reviewed-on: https://skia-review.googlesource.com/34080
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-11 20:32:49 +00:00
Greg Daniel
f88c12ea20 Add api for passing mipped hint into ImageGenerator onGenerateTexture
This does not actually add any additional functionality to the generators.
Once this lands I will enable the generators one at a time to more easily
monitor the effects of each one.

Bug: skia:
Change-Id: I382a1acfaebcbf9ad44c9873b87cdbbe02a13602
Reviewed-on: https://skia-review.googlesource.com/57083
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-11 17:11:07 +00:00
Mike Reed
3758c755d4 remove dead code for returning 0 on overflow
Bug: skia:
Change-Id: I6e7aae1b09cf3a1c9728bdaaa4dbf4df4b2ec16d
Reviewed-on: https://skia-review.googlesource.com/58341
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-11 15:54:37 +00:00
Mike Reed
4815db5938 removed dead code behind legacy fontmgr api flag
Bug: skia:
Change-Id: I7766b10947df384b0e94a32642d5b4321f2e53bd
Reviewed-on: https://skia-review.googlesource.com/58241
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-11 15:18:57 +00:00
Mike Reed
e07622386b clone saturating cast code for doubles
Bug: skia:
Change-Id: I4f35413995cf73c6f130476d6b36e530120aa7ed
Reviewed-on: https://skia-review.googlesource.com/57901
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-10 19:58:13 +00:00
Greg Daniel
834f12076f Set correct mip map status on GrTexture since we no longer require all mip data
Bug: skia:
Change-Id: I5074028f307187eef3201523cbd1ddc7d9bf9013
Reviewed-on: https://skia-review.googlesource.com/54102
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-10 16:45:43 +00:00
Robert Phillips
a108c92ae5 Fix drawSpecialImage
W/o this fix the strict constraint on the specialImage draws can sometimes be removed. This CL ensures that the temporary SkImage always has the actual dimensions of the special Image.

Note: the replacement of full screen clears w/ draws revealed this bug b.c. the image filters were only drawing a rect for the content area of the special images. Thus when the final DAG result was drawn to the canvas some of the bleed through (from the removal of the strict constraint) was showing.

Bug: 755871, 768134
skbug.com/7122

Change-Id: Id67b7143225c24b716e260c973f3bbf68f20188a
Reviewed-on: https://skia-review.googlesource.com/57660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-10 15:41:42 +00:00
Ben Wagner
1c35e571c3 Revert "Revert "Fix a couple float-cast-overflow in SkScan*.""
This reverts commit b6abb9b4e0.

Reason for revert: It doesn't make sense that this CL would affect the tests implicated in the perf regression in skia:7143, and the revert had no effect on the perf of those tests. Seems like the perf alert was either noise or due to a different CL.

Original change's description:
> Revert "Fix a couple float-cast-overflow in SkScan*."
> 
> This reverts commit 3cd0bef0fd.
> 
> Reason for revert: https://bugs.chromium.org/p/skia/issues/detail?id=7143
> 
> Original change's description:
> > Fix a couple float-cast-overflow in SkScan*.
> > 
> > Bug: skia:5060
> > Change-Id: I60a48993c77631aaad9354bb86b13204dc618bf4
> > Reviewed-on: https://skia-review.googlesource.com/47422
> > Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> 
> TBR=benjaminwagner@google.com,reed@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:7143
> Change-Id: I0f19720a7d8344789a375bbb6b9e28bf4f4e55ae
> Reviewed-on: https://skia-review.googlesource.com/57240
> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>

TBR=benjaminwagner@google.com,reed@google.com

Change-Id: I29ac47d6665e2e52ee2a6500488dc407c8d2af1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7143
Reviewed-on: https://skia-review.googlesource.com/57440
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-10-09 22:59:06 +00:00
Ben Wagner
63fd760a37 Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 21:20:34 +00:00
Chris Dalton
4ba211f68f Revert "Enable coverage counting path rendering except on Android framework"
This reverts commit 196efbf71c.

Reason for revert: 1k SKPs GPU bot fails, perf regressions to look into.

Original change's description:
> Enable coverage counting path rendering except on Android framework
> 
> Android framework will come after collecting a bit more data.
> 
> Bug: skia:
> Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c
> Reviewed-on: https://skia-review.googlesource.com/55563
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: I3f1a7022414ccec80541772d9912065fa4efd74e
Reviewed-on: https://skia-review.googlesource.com/57300
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-09 18:41:44 +00:00
Ben Wagner
b6abb9b4e0 Revert "Fix a couple float-cast-overflow in SkScan*."
This reverts commit 3cd0bef0fd.

Reason for revert: https://bugs.chromium.org/p/skia/issues/detail?id=7143

Original change's description:
> Fix a couple float-cast-overflow in SkScan*.
> 
> Bug: skia:5060
> Change-Id: I60a48993c77631aaad9354bb86b13204dc618bf4
> Reviewed-on: https://skia-review.googlesource.com/47422
> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=benjaminwagner@google.com,reed@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:7143
Change-Id: I0f19720a7d8344789a375bbb6b9e28bf4f4e55ae
Reviewed-on: https://skia-review.googlesource.com/57240
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-10-09 16:48:04 +00:00
Mike Reed
7281801849 Revert "Revert "change computeByteSize to return max_size_t on overflow""
This reverts commit 384f0a7d66.

Bug: skia:
Change-Id: I392ef5c1a5172181caf81ae270befeba6e778241
Reviewed-on: https://skia-review.googlesource.com/57084
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-10-09 16:05:34 +00:00
Mike Reed
c5eb97dd88 add helper to check for overflow
pre-CL to aid in changing the convention for when we overflow

Bug: skia:
Change-Id: I1e34a18fefb80187787a1c0c8ed7ee3516744d24
Reviewed-on: https://skia-review.googlesource.com/57103
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-09 15:04:34 +00:00
Ben Wagner
67ef5d7640 Remove SkTypeface::Style use in API.
All known callers of SkTypeface::MakeDefault call it with kNormal and
the only users specifying kNormal explicitly are in Skia, so remove the
parameter. There appear to be no users of SkTypeface::MakeFromTypeface,
so remove it. The current alternative is SkFontMgr::matchFaceStyle which
can do a better job anyway.

Change-Id: I89d94c77f9593407b0a319786848a8b823fcbae4
Reviewed-on: https://skia-review.googlesource.com/56762
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 03:13:33 +00:00
Ben Wagner
3cd0bef0fd Fix a couple float-cast-overflow in SkScan*.
Bug: skia:5060
Change-Id: I60a48993c77631aaad9354bb86b13204dc618bf4
Reviewed-on: https://skia-review.googlesource.com/47422
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-10-07 18:26:51 +00:00
Chris Dalton
196efbf71c Enable coverage counting path rendering except on Android framework
Android framework will come after collecting a bit more data.

Bug: skia:
Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c
Reviewed-on: https://skia-review.googlesource.com/55563
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-07 07:34:20 +00:00
Mike Reed
384f0a7d66 Revert "change computeByteSize to return max_size_t on overflow"
This reverts commit 2429546272.

Reason for revert: broke running dm on google3

Original change's description:
> change computeByteSize to return max_size_t on overflow
> 
> Bug: skia:7132
> Change-Id: I41045640ee62b2c988a84370ead5034bbccc6daf
> Reviewed-on: https://skia-review.googlesource.com/56620
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bungeman@google.com,herb@google.com,reed@google.com

Change-Id: I5f58ec37241d2fae3ebdb7a3d6b41f9fd6d3c2ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7132
Reviewed-on: https://skia-review.googlesource.com/56880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-06 21:24:10 +00:00
Greg Daniel
e1da1d9a7d Add option to create a deferred render target context with mips
We need this since we have texture generators that draw the base level
but nothing more. Thus we want them to be able to directly draw into
a pre allocated mipped target instead of doing a copy later.

TBR: bsalomon@google.com
Bug: skia:
Change-Id: I1dfae0da7153b21b30fdfa51a7061fc255739a1e
Reviewed-on: https://skia-review.googlesource.com/54100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-06 20:28:00 +00:00
Mike Reed
2429546272 change computeByteSize to return max_size_t on overflow
Bug: skia:7132
Change-Id: I41045640ee62b2c988a84370ead5034bbccc6daf
Reviewed-on: https://skia-review.googlesource.com/56620
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-06 19:36:17 +00:00
Chris Dalton
f1b47bb299 Add a cap for geometry shader invocations
Bug: skia:7116
Change-Id: I3cc2ce7b2e5123c9adfd9781b2a5a8553747dfa5
Reviewed-on: https://skia-review.googlesource.com/56000
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-06 18:43:06 +00:00
Ben Wagner
eccda1ceca Clean up SkString reference counting a bit.
This reverts commit 01f8e41c13, and then
works around whatever issues were seen on Ubuntu 14 by continuing the
clean up.

Change-Id: I3523b12c83e4efef01a8142c00cde4e3e12189fa
Reviewed-on: https://skia-review.googlesource.com/55761
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-05 18:15:44 +00:00
Cary Clark
583dd2bbc0 add constexpr to SkRect, SkIRect Make functions
Also, doing so exposed a couple of unused
variables in tests.

R: bsalomon@google.com
Bug: skia: 6898
Change-Id: I7b065e26a838fe55a1d772bcefaef5325e1baa61
Reviewed-on: https://skia-review.googlesource.com/55680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-10-05 16:55:34 +00:00
Robert Phillips
01f8e41c13 Revert "Clean up SkString reference counting a bit."
This reverts commit a910c847e9.

Reason for revert: Compilation failure on Ubuntu14 bots

../../../../../work/skia/src/core/SkString.cpp:200:55: error: could not convert ‘{0, {0}, 0}’ from ‘<brace-enclosed initializer list>’ to ‘const SkString::Rec’
 const SkString::Rec SkString::gEmptyRec = { 0, {0}, 0 };

Original change's description:
> Clean up SkString reference counting a bit.
> 
> BUG=skia:7107
> 
> Change-Id: I47072bf31b902c79dbb850179ff6d35940de3e63
> Reviewed-on: https://skia-review.googlesource.com/54720
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=mtklein@google.com,bungeman@google.com,reed@google.com

Change-Id: I6ec327511e8e1c1fd7e4c1bd5839c0547d4ab609
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7107
Reviewed-on: https://skia-review.googlesource.com/55640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-05 11:28:35 +00:00
Ben Wagner
a910c847e9 Clean up SkString reference counting a bit.
BUG=skia:7107

Change-Id: I47072bf31b902c79dbb850179ff6d35940de3e63
Reviewed-on: https://skia-review.googlesource.com/54720
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-04 21:38:33 +00:00
Cary Clark
490847e209 add missing params
SkBitmap is missing a couple of parameter names.
Parameter names make doxygen easier.

Also qualify hasHardwareMipMap and
setHasHardwareMipMap to Android framework.

R=djsollen@google.com
Bug: skia:6898
Change-Id: I502da35dc5761d73195b6a21dd4310cb001a6924
Reviewed-on: https://skia-review.googlesource.com/55161
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-10-04 15:33:23 +00:00
Mike Reed
f0ffb8943b Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 5a2e50edc5.

Bug: skia:
Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954
Reviewed-on: https://skia-review.googlesource.com/53900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-03 20:03:35 +00:00
Ben Wagner
af89366cb8 Make SkString reference counting thread/TSAN safe.
BUG=skia:7107

Change-Id: I8ead98f7694faaed8e6f6f29b1fcd88501d36b66
Reviewed-on: https://skia-review.googlesource.com/54400
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-03 18:34:35 +00:00
Brian Osman
099fa0fb98 Revert^6 "Make threaded proxy generation MDB-friendly, and defer instantiation"
ANGLE bots were getting lots of corrupted GMs - we set fPreferVRAMUseOverFlushes
to false. In that case, multiple deferred proxies were instantiating to the same
scratch resource. Any proxy that we're going to fill with an ASAP upload needs
to have no pending IO - we hoist all those loads to the front of the flush, so
normal IO tracking doesn't really help.

Bug: skia:
Change-Id: Id36fd8700e522db412a3c992b93c778e2ebb1188
Reviewed-on: https://skia-review.googlesource.com/53940
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 21:04:08 +00:00
Brian Osman
9b1f4bd176 Revert "Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""""
This reverts commit fdd2cb52b7.

Reason for revert: ANGLE gold failures

Original change's description:
> Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
> 
> This reverts commit 9f8d4d36b5.
> 
> Bug: skia:
> Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0
> Reviewed-on: https://skia-review.googlesource.com/52920
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: Ie461de167fbd37323cabd4adf064f99204ba4878
Reviewed-on: https://skia-review.googlesource.com/53801
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 14:00:07 +00:00
Mike Reed
5a2e50edc5 Revert "Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"""
This reverts commit cd284c5323.

Reason for revert:

assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))"

google3 thinks it was from surface_rowbytes

Original change's description:
> Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
> 
> This reverts commit 809cbedd4b.
> 
> Bug: skia:
> Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
> Reviewed-on: https://skia-review.googlesource.com/52665
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/53802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-02 13:44:18 +00:00
Mike Reed
cd284c5323 Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
This reverts commit 809cbedd4b.

Bug: skia:
Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
Reviewed-on: https://skia-review.googlesource.com/52665
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-10-02 12:55:37 +00:00
Chris Dalton
e4679fa06a CCPR: Blacklist Mali GPUs and Vulkan while we work through issues
Bug: skia:
Change-Id: I59dfb1c839a66a6aa6c954e4a544930fc1376a22
Reviewed-on: https://skia-review.googlesource.com/53560
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-09-29 20:25:34 +00:00