aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBitmap.h
Commit message (Collapse)AuthorAge
* Revert "Revert "IWYU""Gravatar Mike Reed2017-02-13
| | | | | | | | | | | This reverts commit 3c727d2386059c1d7cbdcdc9bef5fa18ed33667e. BUG=skia: Change-Id: I72e9b40fec96d044e0ac12906669a52529e77882 Reviewed-on: https://skia-review.googlesource.com/8356 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "IWYU"Gravatar Robert Phillips2017-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc. Reason for revert: It looks like this is breaking the android roll out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp" frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier Original change's description: > IWYU > > BUG=skia: > > Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee > Reviewed-on: https://skia-review.googlesource.com/8231 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a Reviewed-on: https://skia-review.googlesource.com/8346 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* IWYUGravatar Mike Reed2017-02-10
| | | | | | | | | BUG=skia: Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee Reviewed-on: https://skia-review.googlesource.com/8231 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Minor Ganesh refFoo cleanupGravatar Robert Phillips2017-01-13
| | | | | | | 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>
* add writePixels to SkBitmapGravatar Mike Reed2017-01-04
| | | | | | | | | 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>
* SkBitmap::setPixelRef(): less reference churnGravatar Hal Canary2016-12-12
| | | | | | | | | BUG=skia: Change-Id: I9657e4af5fcc808f9175ff336155374ccc77999d Reviewed-on: https://skia-review.googlesource.com/5461 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkBitmap::ComputeIsOpaque -> SkPixmap::computeIsOpaqueGravatar Hal Canary2016-12-07
| | | | | | | | | | | | | | Motivation: Twice internal Skia clients have to do something awkward like this: bool ComputeIsOpaque(const SkPixmap& pixmap) { SkBitmap bm; return bm.installPixels(pixmap) && SkBitmap::ComputeIsOpaque(bm); } Change-Id: I7263c06f754c1305ecb07c4c005d9cfb9d1f523d Reviewed-on: https://skia-review.googlesource.com/5684 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkPixmap::getColor()Gravatar Hal Canary2016-10-31
| | | | | | | | | | | Implement SkBitmap::getColor() in terms of SkPixmap::getColor(). GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4160 Change-Id: I6192a7979d82b3d301a06ae1339bcab4c7ebf7c1 Reviewed-on: https://skia-review.googlesource.com/4160 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Remove SkBitmap::getTexture()Gravatar bsalomon2016-08-30
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289313002 Review-Url: https://codereview.chromium.org/2289313002
* remove/deprecate SkBitmap::getTexture, as it now always returns falseGravatar reed2016-07-25
| | | | | | | | | oh happy day BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175873002 Review-Url: https://codereview.chromium.org/2175873002
* lockPixelsAreWritable is deprecatedGravatar reed2016-07-24
| | | | | | | | | BUG=skia:4328 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177063002 TBR= Review-Url: https://codereview.chromium.org/2177063002
* remove SK_SUPPORT_LEGACY_COLORPROFILETYPE dead-codeGravatar reed2016-06-28
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2101983003 TBR= Review-Url: https://codereview.chromium.org/2101983003
* Revert of More removal of SkColorProfileType... (patchset #2 id:20001 of ↵Gravatar egdaniel2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2071393002/ ) Reason for revert: This was still used in chrome Original issue's description: > More removal of SkColorProfileType... > > Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with > the command line flag that was setting it in DM and nanobench. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 > > Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67 TBR=msarett@google.com,reed@google.com,bsalomon@google.com,brianosman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2074103004
* More removal of SkColorProfileType...Gravatar brianosman2016-06-17
| | | | | | | | | | Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with the command line flag that was setting it in DM and nanobench. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 Review-Url: https://codereview.chromium.org/2071393002
* remove colorprofiletype from imageinfoGravatar reed2016-06-17
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2075853002 Review-Url: https://codereview.chromium.org/2075853002
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | | Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170 Review-Url: https://codereview.chromium.org/2069173002
* Revert of Lots of progress switching to SkColorSpace rather than ↵Gravatar brianosman2016-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | SkColorProfileType (patchset #10 id:180001 of https://codereview.chromium.org/2069173002/ ) Reason for revert: Mac crashes in GrUploadPixmapToTexture Original issue's description: > Lots of progress on switching to SkColorSpace rather than SkColorProfileType > > Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 > > Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170 TBR=reed@google.com,herb@google.com,msarett@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2072813002
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 Review-Url: https://codereview.chromium.org/2069173002
* Prototype code that turns any/every flattenable into JSONGravatar brianosman2016-05-04
| | | | | | | | | | | | | | | | | | | | | This makes inspecting things in SkDebugger far more useful - any filter or other complex object on the paint is ultimately visible. You still have to do some guess work to figure out what the fields actually mean, but you can at least cross-reference with the code in flatten(). Screenshots: Before: https://screenshot.googleplex.com/a6JM5HBBe6G.png After : https://screenshot.googleplex.com/XQfr4YJ6mnH.png Changes to public API are just removals and changes to make some functions virtual. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1920423002 Review-Url: https://codereview.chromium.org/1920423002
* spriteblitter for memcpy case (for all configs)Gravatar reed2016-04-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1887103003 Review URL: https://codereview.chromium.org/1887103003
* SkBitmap moveGravatar halcanary2015-12-14
| | | | | | | | Running `Release/dm --gpu 0`, the number of times we call SkBitmap::operator=(const SkBitmap&) (which refs the pixelref) is reduced from ~214929 to ~214626. Review URL: https://codereview.chromium.org/1514503004
* SkBitmap::installPixels(const SkPixmap&);Gravatar halcanary2015-12-09
| | | | Review URL: https://codereview.chromium.org/1505333002
* Remove SkBitmapSourceGravatar fmalita2015-09-25
| | | | | | | | | To avoid breaking existing SKPs, add a deserialization stub which unflattens SkBitmapSource records to SkImageSources. R=reed@google.com,mtklein@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/1363913002
* Use SkImageCacherator in SkImagesGravatar reed2015-09-10
| | | | | | | | | | | | Possible follow-up changes to consider 1. Roll SkImage_Raster and _Gpu into _Generator, where the generator (or cacherator) is backed by a pre-existing texture or raster. 2. Evolve SkImageUsageType into a verb requiring stretching, and have the caller (common code) digest the caps() and usage, so that subclasses are just told what to do (stretch or not) 3. Common code/utility to convert an unstretched texture into a stretch one (and cache it) if the generator can only make an unstretched one. BUG=skia: Review URL: https://codereview.chromium.org/1282363002
* remove SkInstCntGravatar mtklein2015-06-26
| | | | | | | | | | | | | | It's been outclassed by Valgrind and leak sanitizer, and it seems to be causing problems for external folks building Skia. I'm not sure why our own builds seem unaffected. Latest thread: https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0 BUG=skia: Review URL: https://codereview.chromium.org/1217573002
* Revert "Revert of move erase into SkPixmap (patchset #1 id:1 of ↵Gravatar reed2015-06-08
| | | | | | | | | | | https://codereview.chromium.org/1161033005/)" This reverts commit cca9b3ac908cf3e9a0c5774a5ffd118d8429e08a. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1153473012
* Revert of move erase into SkPixmap (patchset #1 id:1 of ↵Gravatar djsollen2015-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1161033005/) Reason for revert: broken builds Original issue's description: > move erase into SkPixmap > > harvested from https://codereview.chromium.org/1148793007 > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/0963f5dab079627c5523ce6a443af27a33e361f7 TBR=reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1157303008
* move erase into SkPixmapGravatar reed2015-06-08
| | | | | | | | | harvested from https://codereview.chromium.org/1148793007 BUG=skia: TBR= Review URL: https://codereview.chromium.org/1161033005
* use pixmaps for dst in sprites -- NO BITMAPSGravatar reed2015-06-05
| | | | | | | BUG=skia: TBR=scroggo@google.com Review URL: https://codereview.chromium.org/1143173011
* Revert[6] of add asserts around results from requestLockGravatar reed2015-05-30
| | | | | | | | | This reverts commit 11e833d91b5ba2193ed593cb74900dddbec24b6f. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1159183003
* add SkPixmap and external locking to bitmapsGravatar reed2015-05-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1074983003
* remove unused SkBitmap::scrollRect APIGravatar reed2015-05-21
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1154623002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE codeGravatar reed2015-03-20
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1020403002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Add sRGB texture support.Gravatar jvanverth2014-12-22
| | | | Review URL: https://codereview.chromium.org/791823003
* remove dead code behind SK_SUPPORT_LEGACY_ALLOCPIXELS_BOOLGravatar reed2014-12-18
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/814753004
* SkColorTable locking serves no purpose anymore.Gravatar mtklein2014-12-02
| | | | | | | | | The only thing the unlock methods were doing was assert their balance. This removes the unlock methods and renames the lock methods "read". BUG=skia: Review URL: https://codereview.chromium.org/719213008
* Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap.Gravatar halcanary2014-10-24
| | | | Review URL: https://codereview.chromium.org/646213003
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Hide fields in SkImageInfoGravatar reed2014-09-03
| | | | | | | | | R=rmistry@google.com TBR=bsalomon Author: reed@google.com Review URL: https://codereview.chromium.org/536003002
* make allocPixels throw on failureGravatar reed2014-09-02
| | | | | | | | | BUG=skia: R=mtklein@google.com, fmalita@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/510423005
* eliminate code related to SkBitmap::ConfigGravatar reed2014-08-18
| | | | | | | | | BUG=skia: R=reed@google.com, mike@reedtribe.org Author: reed@chromium.org Review URL: https://codereview.chromium.org/483593002
* Remove kImageIsImmutable_Flag.Gravatar scroggo2014-07-15
| | | | | | | | | | | | | | | | | | This flag was only used when setting or checking SkBitmap's immutability when it did not have an SkPixelRef. Now that an SkBitmap *must* have one in order to draw (e.g. you can no longer have an SkBitmap that owns its pixels directly), its immutabity without an SkPixelRef makes no sense. Also, now that the flags are not contiguous starting from 0x01, use a more appropriate check to ensure only meaningful flags are used. R=reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/387083002
* Remove unused kImageIsOpaque_Flag.Gravatar scroggo2014-07-14
| | | | | | | | | | | This flag is never set or read. We now look at the alpha type to determine opacity. R=reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/385943003
* Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixelsGravatar reed2014-07-13
| | | | | | | | | | This reverts commit 651eaeadeb0b1407f5fe192aeda90db1680fa2b8. TBR= Author: reed@chromium.org Review URL: https://codereview.chromium.org/390693002
* Revert of Add SkBitmap::readPixels() and reimplement copyTo and ↵Gravatar reed2014-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SkCanvas::readPixels (https://codereview.chromium.org/388803007/) Reason for revert: still failing (randomly?) bench sometimes. need stack dump to diagnose. Original issue's description: > Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixels > usning it. > > Revert "Revert of add readPixels() to SkBitmap (https://codereview.chromium.org/377303002/)" > > This reverts commit d08cb905a7cc80d8fb868bbd14fffe1cd68adcce. > > TBR=scroggo@google.com > > Committed: https://skia.googlesource.com/skia/+/debba5c3d091159149f8a88ab5dcd44dd72e0dc7 R=reed@google.com TBR=reed@google.com NOTREECHECKS=true NOTRY=true Author: reed@chromium.org Review URL: https://codereview.chromium.org/382543005
* Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixelsGravatar reed2014-07-12
| | | | | | | | | | | | | | | usning it. Revert "Revert of add readPixels() to SkBitmap (https://codereview.chromium.org/377303002/)" This reverts commit d08cb905a7cc80d8fb868bbd14fffe1cd68adcce. R=reed@chromium.org TBR=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/388803007
* Revert of add readPixels() to SkBitmap ↵Gravatar jcgregorio2014-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/377303002/) Reason for revert: Maybe causing crashes in bench. http://108.170.220.120:10117/builders/Test-ChromeOS-Daisy-MaliT604-Arm7-Debug/builds/2608/steps/RunBench/logs/stdio Original issue's description: > add readPixels() to SkBitmap > > BUG=chromium:390782 > > Committed: https://skia.googlesource.com/skia/+/c4f216151b6ade70c35fade09a353052f40236b1 R=scroggo@google.com, bsalomon@google.com, reed@google.com TBR=bsalomon@google.com, reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=chromium:390782 Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/382243003
* add readPixels() to SkBitmapGravatar reed2014-07-10
| | | | | | | | | BUG=chromium:390782 R=scroggo@google.com, bsalomon@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/377303002