aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkImageInfo.cpp
Commit message (Collapse)AuthorAge
* Revert "Add SkImageInfoValidConversion() and SkImageInfoIsValid"Gravatar Brian Osman2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cf5d6caff7a58f1c7ecc36d9a91ccdada5fc7b78. Reason for revert: Chrome DEPS roll failing, based on the unit tests, I suspect this is the cause. Original change's description: > Add SkImageInfoValidConversion() and SkImageInfoIsValid > > The idea is share these standards for the following: > SkImage::readPixels() > SkCanvas::readPixels() > SkCanvas::writePixels() > SkBitmap::readPixels() > SkPixmap::readPixels() > > On the raster side, SkPixmap::readPixels() is the right > place to check, because all raster calls go through > there eventually. Then at lower levels (ex: SkPixelInfo), > we can assert. > > There's not really a unifying location for gpu calls, > so I've added this in multiple places. I haven't really > dug into the gpu code to SkASSERT() on invalid cases > that we will have already caught. > > Follow-up work: > Similar refactor for SkReadPixelRec::trim(). > Code cleanup in SkPixelInfo::CopyPixels() > > BUG=skia:6021 > > Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2 > Reviewed-on: https://skia-review.googlesource.com/6887 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia:6021 Change-Id: I63b88e90bdbb3051a14de00ac73a8351ab776d25 Reviewed-on: https://skia-review.googlesource.com/7095 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkImageInfoValidConversion() and SkImageInfoIsValidGravatar Matt Sarett2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is share these standards for the following: SkImage::readPixels() SkCanvas::readPixels() SkCanvas::writePixels() SkBitmap::readPixels() SkPixmap::readPixels() On the raster side, SkPixmap::readPixels() is the right place to check, because all raster calls go through there eventually. Then at lower levels (ex: SkPixelInfo), we can assert. There's not really a unifying location for gpu calls, so I've added this in multiple places. I haven't really dug into the gpu code to SkASSERT() on invalid cases that we will have already caught. Follow-up work: Similar refactor for SkReadPixelRec::trim(). Code cleanup in SkPixelInfo::CopyPixels() BUG=skia:6021 Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2 Reviewed-on: https://skia-review.googlesource.com/6887 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Rename all color space factories from New* to Make*Gravatar Brian Osman2016-10-24
| | | | | | | | | | | | | | | | | | | | | Matches our naming convention for all other types - factories that return sk_sp (or any type that intelligently manages its own lifetime) are named Make. Previous factories are still around, assuming SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that define for Android, etc. See also: https://codereview.chromium.org/2442053002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3822 Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d Reviewed-on: https://skia-review.googlesource.com/3822 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Tighten up masking of colorType & alphaType in SkImageInfo serialization ↵Gravatar robertphillips2016-06-28
| | | | | | | | | | (for fuzzer bug) In this case the int that contains the color and alpha types is getting munged. We don't really case that the surplus bits are 0 just that the values we care about are reasonable. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2110493002 Review-Url: https://codereview.chromium.org/2110493002
* 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
* Enable flattening and unflattening of SkColorSpaceGravatar msarett2016-06-22
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085653003 Review-Url: https://codereview.chromium.org/2085653003
* More removal of SkColorProfileType...Gravatar brianosman2016-06-20
| | | | | | | | | | | 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 Review-Url: https://codereview.chromium.org/2071393002
* 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
* SkPixmap::setColorSpaceGravatar msarett2016-06-09
| | | | | | | | | | | | Landed for reed@ with bug fix: Use default copy constructor for SkDraw BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2057563002 patch from issue 2057563002 at patchset 1 (http://crrev.com/2057563002#ps1) Review-Url: https://codereview.chromium.org/2052943002
* add MakeS32 helper to SkImageInfo, fix named-gamma constructor bugGravatar reed2016-06-02
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035813003 Review-Url: https://codereview.chromium.org/2035813003
* Add SkColorSpace to SkImageInfoGravatar msarett2016-05-27
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2000713003 Review-Url: https://codereview.chromium.org/2000713003
* Revert of Change to sRGB default for codec generated images. (patchset #2 ↵Gravatar herb2016-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | id:20001 of https://codereview.chromium.org/1955063002/ ) Reason for revert: TBR=brianosman@google.com Original issue's description: > Change to sRGB default for codec generated images. > > Compared the gm and skps for 8888 and srgb. There are no differences for 8888, there are 100 differences for sRGB, but the 100 look correct compared to the old ones. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955063002 > > Committed: https://skia.googlesource.com/skia/+/7acc00853174361cf921ecac8fbeaf6812f53eed TBR=brianosman@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/1982323002
* Change to sRGB default for codec generated images.Gravatar herb2016-05-16
| | | | | | | | | Compared the gm and skps for 8888 and srgb. There are no differences for 8888, there are 100 differences for sRGB, but the 100 look correct compared to the old ones. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955063002 Review-Url: https://codereview.chromium.org/1955063002
* SkDefaultColorProfile: Hide gDefaultProfileIsSRGBGravatar halcanary2016-04-25
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1917443002 Review URL: https://codereview.chromium.org/1917443002
* gDefaultProfileIsSRGB symbol must exist in .soGravatar halcanary2016-04-21
| | | | | | | fix fiddle TBR= Review URL: https://codereview.chromium.org/1912593003
* Make all the codecs default profiles based on gTreatSkColorAsSRGB.Gravatar herb2016-04-20
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893203006 Review URL: https://codereview.chromium.org/1893203006
* Revert of move static arrays into impl, to avoid multiple copies (patchset ↵Gravatar reed2016-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | #3 id:40001 of https://codereview.chromium.org/1889793007/ ) Reason for revert: FAILED: if [ ! -e lib/libgfx.so -o ! -e lib/libgfx.so.TOC ]; then /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.TOC; else /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.tmp && if ! cmp -s lib/libgfx.so.tmp lib/libgfx.so.TOC; then mv lib/libgfx.so.tmp lib/libgfx.so.TOC ; fi; fi obj/ui/gfx/gfx.blit.o:../../ui/gfx/blit.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel' obj/ui/gfx/gfx.canvas.o:../../ui/gfx/canvas.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel' obj/ui/gfx/gfx.canvas_skia.o:../../ui/gfx/canvas_skia.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel' obj/ui/gfx/codec/gfx.jpeg_codec.o:../../ui/gfx/codec/jpeg_codec.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel' clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. Original issue's description: > move static arrays into impl, to avoid multiple copies > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889793007 > > Committed: https://skia.googlesource.com/skia/+/6d7cd1f421dbde43dd2db655ca477c05312ec5fd TBR=fmalita@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review URL: https://codereview.chromium.org/1899563002
* move static arrays into impl, to avoid multiple copiesGravatar reed2016-04-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889793007 Review URL: https://codereview.chromium.org/1889793007
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* update allocpixels to know about F16Gravatar reed2016-02-06
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1675093002 TBR= Review URL: https://codereview.chromium.org/1675093002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* add kGray_8_SkColorTypeGravatar reed2015-03-17
| | | | | | | | | patch from issue 1014783003 at patchset 60001 (http://crrev.com/1014783003#ps60001) BUG=skia: TBR= Review URL: https://codereview.chromium.org/1010343002
* Revert of Revert of replace kIgnore_SkAlphaType with kUnknown_SkAlphaType ↵Gravatar reed2015-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 id:1 of https://codereview.chromium.org/966753002/) Reason for revert: Android has been updated, so we can re-land this. Original issue's description: > Revert of replace kIgnore_SkAlphaType with kUnknown_SkAlphaType (patchset #3 id:40001 of https://codereview.chromium.org/964613002/) > > Reason for revert: > This breaks Android framework build. See > > https://android-build.storage.googleapis.com/builds/git_master-skia-linux-volantisg-userdebug/1759130/7f0fcdbf3c0d47530d770a15c912298dac20dd7d90a01de63ecb9ba16c96b25c/logs/build_error.log?Expires=1425047630&GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Signature=BHPS1lffyH7WykwyEw5RXVVXWqQK5rab%2B6Pl1VaUrTlmWT%2FXb6fq%2FBe22AUDZYFPG24MBR%2F2IzIDzTqH3mihQS9wIkcKJ4kJpA2G%2BI3l8jCX20brZSr3bsDSx%2F4wsLwU1bBpIxI%2FbrauoPRqddbXP8sNI1l51u6ZCxpvRQms9Mc%3D > > We need to stop them from using kIgnore before we can reland this. > > Original issue's description: > > replace kIgnore_SkAlphaType with kUnknown_SkAlphaType > > > > BUG=skia: > > TBR= > > > > Committed: https://skia.googlesource.com/skia/+/1c8aeeaebce9675197be31bd769e8ffa2531bf86 > > TBR=reed@google.com,reed@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/574290f61a47bd1ce1f9e2d941533bda9c8f03fe TBR=reed@chromium.org,scroggo@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/966853002
* Revert of replace kIgnore_SkAlphaType with kUnknown_SkAlphaType (patchset #3 ↵Gravatar scroggo2015-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | id:40001 of https://codereview.chromium.org/964613002/) Reason for revert: This breaks Android framework build. See https://android-build.storage.googleapis.com/builds/git_master-skia-linux-volantisg-userdebug/1759130/7f0fcdbf3c0d47530d770a15c912298dac20dd7d90a01de63ecb9ba16c96b25c/logs/build_error.log?Expires=1425047630&GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Signature=BHPS1lffyH7WykwyEw5RXVVXWqQK5rab%2B6Pl1VaUrTlmWT%2FXb6fq%2FBe22AUDZYFPG24MBR%2F2IzIDzTqH3mihQS9wIkcKJ4kJpA2G%2BI3l8jCX20brZSr3bsDSx%2F4wsLwU1bBpIxI%2FbrauoPRqddbXP8sNI1l51u6ZCxpvRQms9Mc%3D We need to stop them from using kIgnore before we can reland this. Original issue's description: > replace kIgnore_SkAlphaType with kUnknown_SkAlphaType > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/1c8aeeaebce9675197be31bd769e8ffa2531bf86 TBR=reed@google.com,reed@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/966753002
* replace kIgnore_SkAlphaType with kUnknown_SkAlphaTypeGravatar reed2015-02-27
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/964613002
* dd readPixels to SkImageGravatar reed2014-12-10
| | | | | | | | patch from issue 789673007 at patchset 1 (http://crrev.com/789673007#ps1) BUG=skia: Review URL: https://codereview.chromium.org/793723002
* flag imageinfo as srgbGravatar reed2014-11-10
| | | | | | | | | | | | intended uses: - flag a SkSurface as sRGB (only supported by Ganesh for now) - flag images (e.g. png or jpeg) as sRGB if the codec tells us that wins: - faster gamma-correct text (esp. w/ distance-fields) when we can use sRGB for text - better color fidelity when the screen really is sRGB Review URL: https://codereview.chromium.org/676883003
* Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of ↵Gravatar reed2014-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/527073003/) Reason for revert: virtual gpu failures in layouttests http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/23717 [6:6:0903/041147:1700960503:INFO:SkBitmap.cpp(1003)] ../../third_party/skia/src/core/SkBitmap.cpp:1003: failed assertion "fPixelRef->info() == pixelRef->info()" [6:6:0903/041147:1700961002:FATAL:SkBitmap.cpp(1003)] SK_CRASH #0 0x7f9867df2c1e base::debug::StackTrace::StackTrace() #1 0x7f9867e89e05 logging::LogMessage::~LogMessage() #2 0x7f98689c4970 SkDebugf_FileLine() #3 0x7f986870ebc6 SkBitmap::deepCopyTo() #4 0x7f98690a3b6d blink::deepSkBitmapCopy() #5 0x7f98690a3abe blink::ImageBuffer::copyImage() #6 0x7f985fd4479e blink::ImageBitmap::ImageBitmap() #7 0x7f985fd45942 blink::ImageBitmap::create() #8 0x7f985fd84fdc blink::ImageBitmapFactories::createImageBitmap() #9 0x7f985fd84d11 blink::ImageBitmapFactories::createImageBitmap() #10 0x7f985ec9a7f2 blink::LocalDOMWindowV8Internal::createImageBitmap13Method() #11 0x7f985ec96b0c blink::LocalDOMWindowV8Internal::createImageBitmapMethod() #12 0x7f985ec91954 blink::LocalDOMWindowV8Internal::createImageBitmapMethodCallback() #13 0x7f9869955af0 v8::internal::FunctionCallbackArguments::Call() #14 0x7f98699833bd v8::internal::Builtin_HandleApiCall() Original issue's description: > Add gamma/sRGB tag to SkImageInfo > > This reverts commit 1cbc68f9659f15206d920dacd434ddf4b658ad1f. > > requires this to land in blink https://codereview.chromium.org/531883002/ > > Committed: https://skia.googlesource.com/skia/+/2f6abdecc5c2f21da13003c615903679abc73fc7 R=fmalita@google.com, reed@chromium.org TBR=fmalita@google.com, reed@chromium.org NOTREECHECKS=true NOTRY=true Author: reed@google.com Review URL: https://codereview.chromium.org/535113002
* Add gamma/sRGB tag to SkImageInfoGravatar reed2014-09-02
| | | | | | | | | | | | This reverts commit 1cbc68f9659f15206d920dacd434ddf4b658ad1f. requires this to land in blink https://codereview.chromium.org/531883002/ R=fmalita@google.com, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/527073003
* Revert of Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 ↵Gravatar reed2014-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/532583002/) Reason for revert: linux_blink_rel [ RUN ] DeferredImageDecoderTest.drawIntoSkPicture ../../third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp:172: Failure Value of: canvasBitmap.getColor(0, 0) Actual: 0 Expected: static_cast<SkColor>( (static_cast<U8CPU>(255) << 24) | (static_cast<U8CPU>(255) << 16) | (static_cast<U8CPU>(255) << 8) | (static_cast<U8CPU>(255) << 0)) Which is: 4294967295 [ FAILED ] DeferredImageDecoderTest.drawIntoSkPicture (0 ms) [1457/1458] DeferredImageDecoderTest.drawIntoSkPicture (0 ms) [ RUN ] DeferredImageDecoderTest.decodeOnOtherThread ../../third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp:233: Failure Value of: canvasBitmap.getColor(0, 0) Actual: 0 Expected: static_cast<SkColor>( (static_cast<U8CPU>(255) << 24) | (static_cast<U8CPU>(255) << 16) | (static_cast<U8CPU>(255) << 8) | (static_cast<U8CPU>(255) << 0)) Which is: 4294967295 [ FAILED ] DeferredImageDecoderTest.decodeOnOtherThread (1 ms) [1458/1458] DeferredImageDecoderTest.decodeOnOtherThread (1 ms) Retrying 2 tests (retry #2) Original issue's description: > Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/525113005/) > > Reason for revert: > Experiment to see resulting failures > > Original issue's description: > > Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/) > > > > Reason for revert: > > seems to be breaking layout tests in roll > > > > Original issue's description: > > > Add gamma/sRGB tag to SkImageInfo > > > > > > This reverts commit 64ba5fa1ff428858f803523257cd862f8b33423b. > > > > > > BUG=skia: > > > > > > Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb > > > > TBR=reed@google.com > > NOTREECHECKS=true > > NOTRY=true > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/b44c1895afae516cb851cd1a0cea83343c354ee4 > > TBR=reed@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4581828014eb3d015e6ed55c9a5b6932b8751818 R=reed@google.com TBR=reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/524593005
* Revert of Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of ↵Gravatar reed2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/525113005/) Reason for revert: Experiment to see resulting failures Original issue's description: > Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of https://codereview.chromium.org/522813002/) > > Reason for revert: > seems to be breaking layout tests in roll > > Original issue's description: > > Add gamma/sRGB tag to SkImageInfo > > > > This reverts commit 64ba5fa1ff428858f803523257cd862f8b33423b. > > > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb > > TBR=reed@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/b44c1895afae516cb851cd1a0cea83343c354ee4 R=reed@google.com TBR=reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/532583002
* Revert of Add gamma/sRGB tag to SkImageInfo (patchset #1 id:1 of ↵Gravatar reed2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/522813002/) Reason for revert: seems to be breaking layout tests in roll Original issue's description: > Add gamma/sRGB tag to SkImageInfo > > This reverts commit 64ba5fa1ff428858f803523257cd862f8b33423b. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/c89aa509d6a094bc1b18d73135343819903a9cfb R=reed@google.com TBR=reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/525113005
* Add gamma/sRGB tag to SkImageInfoGravatar reed2014-09-01
| | | | | | | | | | | This reverts commit 64ba5fa1ff428858f803523257cd862f8b33423b. BUG=skia: R=reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/522813002
* Revert of Add gamma/sRGB tags to SkImageInfo (patchset #1 of ↵Gravatar reed2014-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/517123002/) Reason for revert: Seems to be triggering assert in blink SSLUITest.TestRedirectHTTPToBadHTTPS (run #1): [ RUN ] SSLUITest.TestRedirectHTTPToBadHTTPS HTTP server started on http://127.0.0.1:58000... sending server_data: {"host": "127.0.0.1", "port": 58000} (36 bytes) HTTPS server started on https://127.0.0.1:58009... sending server_data: {"host": "127.0.0.1", "port": 58009} (36 bytes) ASSERTION FAILED: info.fAlphaType == m_imageInfo.fAlphaType ../../third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp(78) : virtual bool blink::DecodingImageGenerator::onGetPixels(const SkImageInfo &, void *, size_t, SkPMColor *, int *) 1 0x77eb0d3 blink::DecodingImageGenerator::onGetPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*) 2 0x92edddc SkImageGenerator::getPixels(SkImageInfo const&, void*, unsigned long, unsigned int*, int*) 3 0x92adf78 SkDiscardablePixelRef::onNewLockPixels(SkPixelRef::LockRec*) 4 0x9369283 SkPixelRef::lockPixels(SkPixelRef::LockRec*) 5 0x9369433 SkPixelRef::lockPixels() 6 0x9213344 SkBitmap::lockPixels() const 7 0x921ca57 SkAutoLockPixels::SkAutoLockPixels(SkBitmap const&, bool) 8 0x921ad80 SkAutoLockPixels::SkAutoLockPixels(SkBitmap const&, bool) 9 0x92b7125 SkDraw::drawBitmap(SkBitmap const&, SkMatrix const&, SkPaint const&) const 10 0x921f4fb SkBitmapDevice::drawBitmap(SkDraw const&, SkBitmap const&, SkMatrix const&, SkPaint const&) 11 0x921f8c7 SkBitmapDevice::drawBitmapRect(SkDraw const&, SkBitmap const&, SkRect const*, SkRect const&, SkPaint const&, SkCanvas::DrawBitmapRectFlags) 12 0x9288e12 SkCanvas::internalDrawBitmapRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) 13 0x9288ee9 SkCanvas::drawBitmapRectToRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) Original issue's description: > Add gamma/sRGB tags to SkImageInfo > > requires this CL to land in chrome > https://codereview.chromium.org/517803002/ > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/228b285ba14a6e9b6d1cc95ea1583caab30168a1 R=fmalita@google.com, fmalita@chromium.org, reed@chromium.org TBR=fmalita@chromium.org, fmalita@google.com, reed@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/519583004
* Add gamma/sRGB tags to SkImageInfoGravatar reed2014-08-29
| | | | | | | | | | | | requires this CL to land in chrome https://codereview.chromium.org/517803002/ BUG=skia: R=fmalita@google.com, fmalita@chromium.org, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/517123002
* Revert of Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of ↵Gravatar reed2014-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/511363002/) Reason for revert: android builder in chrome reveals the caller using { } initialization for SkImageInfo, which this CL now makes illegal. Will have to fix the call site before I can re-land this Original issue's description: > Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of https://codereview.chromium.org/512243002/) > > Reason for revert: > this revert was premature -- the chrome canary I looked at is old, and newer ones were green. So trying again... > > Original issue's description: > > Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/) > > > > Reason for revert: > > breaks linker on chrome -- may need SK_API, but not sure. > > > > Original issue's description: > > > add gamma/sRGB to SkImageInfo > > > > > > BUG=skia: > > > > > > Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485 > > > > TBR=bungeman@google.com,bsalomon@google.com > > NOTREECHECKS=true > > NOTRY=true > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/dc53701216c0e9f98eacf6c0cda769ebbd200b59 > > TBR=bungeman@google.com,bsalomon@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/e759a2662273fdf52ebbb3822229945eda317e46 R=bungeman@google.com, bsalomon@google.com TBR=bsalomon@google.com, bungeman@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/517113002
* Revert of Revert of add gamma/sRGB to SkImageInfo (patchset #1 of ↵Gravatar reed2014-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/512243002/) Reason for revert: this revert was premature -- the chrome canary I looked at is old, and newer ones were green. So trying again... Original issue's description: > Revert of add gamma/sRGB to SkImageInfo (patchset #4 of https://codereview.chromium.org/514753002/) > > Reason for revert: > breaks linker on chrome -- may need SK_API, but not sure. > > Original issue's description: > > add gamma/sRGB to SkImageInfo > > > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485 > > TBR=bungeman@google.com,bsalomon@google.com > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/dc53701216c0e9f98eacf6c0cda769ebbd200b59 R=bungeman@google.com, bsalomon@google.com TBR=bsalomon@google.com, bungeman@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/511363002
* Revert of add gamma/sRGB to SkImageInfo (patchset #4 of ↵Gravatar reed2014-08-28
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/514753002/) Reason for revert: breaks linker on chrome -- may need SK_API, but not sure. Original issue's description: > add gamma/sRGB to SkImageInfo > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/615c369777258231054840a88cdb74c68c382485 R=bungeman@google.com, bsalomon@google.com TBR=bsalomon@google.com, bungeman@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/512243002
* add gamma/sRGB to SkImageInfoGravatar reed2014-08-28
| | | | | | | | | BUG=skia: R=bungeman@google.com, bsalomon@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/514753002
* Adjust the alpha type for pixelRefs.Gravatar scroggo2014-07-01
| | | | | | | | | | | | | | Move SkBitmap's validate_alphaType to SkImageInfo, with the new name SkColorTypeValidateAlphaType. Use it in SkPixelRef's constructors, as well as in SkDecodingImageGenerator. This fixes a bug where an SkPixelRef's SkAlphaType could get out of sync with its SkBitmap, when both were assigned the same SkAlphaType. R=reed@google.com, halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/346593003
* Refactor read and write buffers.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer a step each in the hierarchy. What used to be this: SkFlattenableWriteBuffer -> SkOrderedWriteBuffer SkFlattenableReadBuffer -> SkOrderedReadBuffer SkFlattenableReadBuffer -> SkValidatingReadBuffer is now SkWriteBuffer SkReadBuffer -> SkValidatingReadBuffer Benefits: - code is simpler, names are less wordy - the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed - write buffers are completely devirtualized, important for record speed This refactoring was mostly mechanical. You aren't going to find anything interesting in files with less than 10 lines changed. BUG=skia: R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/134163010 git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed more fuzzer issuesGravatar commit-bot@chromium.org2013-12-17
| | | | | | | | | | | | | | | | - Added the "isAvailable" function to check how much bytes are remaining in the stream before doing potentially large mallocs. That way, we can signal a bad stream instead of crashing. - Added data validation in SkImageInfo.cpp - Added NULL pointer check in displacement - Modified the fuzzer for randomized bitmap types BUG=328934,329254 R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/116773002 git-svn-id: http://skia.googlecode.com/svn/trunk@12723 2bbb7eff-a529-9590-31e7-b0007b416f81
* addGravatar reed@google.com2013-12-09
git-svn-id: http://skia.googlecode.com/svn/trunk@12587 2bbb7eff-a529-9590-31e7-b0007b416f81