aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PixelRefTest.cpp
Commit message (Collapse)AuthorAge
* guard references to SkColorTableGravatar Mike Reed2017-07-18
| | | | | | | | Bug: skia:6828 Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108 Reviewed-on: https://skia-review.googlesource.com/24260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Revert[4] "clean up (partially) colortable api""""Gravatar Mike Reed2017-04-03
| | | | | | | | | | | | | | Fixes: - create temp api for android to pass nullptr - don't release and access sk_sp<SkData> at the same time in parameters This reverts commit b14131c1851eea6acbd34cc42a8f860daed36b21. Bug: skia: Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8 Reviewed-on: https://skia-review.googlesource.com/11129 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Revert[2] "clean up (partially) colortable api"""Gravatar Mike Reed2017-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9920b10f5292838f00600f676c4578cd11705e60. Reason for revert: trying to get details on w2k failure https://chromium-swarm.appspot.com/task?id=354345d34ba3b310&refresh=10 Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION, was running: unit test HugeBlurImageFilter unit test FontNames unit test Codec_PngRoundTrip unit test ClampRange unit test FontHost unit test ColorMatrixFilter f16 image scaled_codec_premul abnormal.wbmp 565 image brd_android_codec_divisor_0.167 interlaced3.png_0.167 unit test Codec_png unit test ImageFilterBlurLargeImage unit test FontObj unit test DrawText unit test GrShape 565 image brd_android_codec_divisor_0.333 interlaced2.png_0.333 unit test PathOpsOpCubicsThreaded unit test PathOpsOpLoopsThreaded unit test FontMgr unit test ColorToHSVRoundTrip unit test Image_Serialize_Encoding_Failure Likely culprit: unit test Image_Serialize_Encoding_Failure step returned non-zero exit code: -1073741819 Original change's description: > Revert[2] "clean up (partially) colortable api"" > > This reverts commit 1d1165ca6575e082b892c5460492c411618783ad. > > Bug: skia: > Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408 > Reviewed-on: https://skia-review.googlesource.com/11024 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia4e73434b083224baa36092c69526c2f59bb16aa Reviewed-on: https://skia-review.googlesource.com/11025 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[2] "clean up (partially) colortable api""Gravatar Mike Reed2017-04-01
| | | | | | | | | | This reverts commit 1d1165ca6575e082b892c5460492c411618783ad. Bug: skia: Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408 Reviewed-on: https://skia-review.googlesource.com/11024 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "clean up (partially) colortable api"Gravatar Mike Klein2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e491a6a113c5e16a3b7bede5fa6f588deeb928d. Reason for revert: Windows unit tests failing? Original change's description: > clean up (partially) colortable api > > Needs this to land: https://codereview.chromium.org/2789853002/ > > Bug: skia: > Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7 > Reviewed-on: https://skia-review.googlesource.com/10600 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I626e7edfcea82576a440dcaa851a04cedee6233f Reviewed-on: https://skia-review.googlesource.com/10966 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* clean up (partially) colortable apiGravatar Mike Reed2017-03-31
| | | | | | | | | | Needs this to land: https://codereview.chromium.org/2789853002/ Bug: skia: Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7 Reviewed-on: https://skia-review.googlesource.com/10600 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* tests: s/SkAutoTUnref/sk_sp/Gravatar Hal Canary2016-11-04
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4394 Change-Id: I088b3c6e2adff07abed1e8a50091cc0ec4a4109c Reviewed-on: https://skia-review.googlesource.com/4394 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* 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
* Revert of Revert[4] of add asserts around results from requestLock (patchset ↵Gravatar reed2015-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #3 id:40001 of https://codereview.chromium.org/1159733006/) Reason for revert: gfx_unittests (under linux_asan) @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@Direct leak of 368 byte(s) in 1 object(s) allocated from:@@@ @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #0 0x4cc74b in __interceptor_malloc (/b/build/slave/linux_asan/build/src/out/Release/gfx_unittests+0x4cc74b)@@@ @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #1 0x7f2f7060ebdf in _cairo_image_surface_create_for_pixman_image /build/buildd/cairo-1.10.2/src/cairo-image-surface.c:158@@@ @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@@@@ @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@Indirect leak of 256 byte(s) in 1 object(s) allocated from:@@@ @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #0 0x4cc74b in __interceptor_malloc (/b/build/slave/linux_asan/build/src/out/Release/gfx_unittests+0x4cc74b)@@@ @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #1 0x7f2f6c7be26a in _pixman_image_allocate /build/buildd/pixman-0.30.2/build/pixman/../../pixman/pixman-image.c:184@@@ @@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@@@@ I think they are creating a cairo surface, but it has no pixels (zero size?). In this CL, if I see no pixels, I ignore the call-back which is used to free the surface (doh). Original issue's description: > Revert[4] of add asserts around results from requestLock > > This reverts commit 19663e54c017499406036746e7689193aa6417e6. > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/df91b73a34e3a306c93a5e320704736255c3d9f0 TBR=reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1151063005
* Revert[4] of add asserts around results from requestLockGravatar reed2015-05-30
| | | | | | | | | This reverts commit 19663e54c017499406036746e7689193aa6417e6. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1159733006
* Revert of add asserts around results from requestLock (patchset #3 id:40001 ↵Gravatar reed2015-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.or… (patchset #1 id:1 of https://codereview.chromium.org/1165583005/) Reason for revert: failure in cc_unittests (need to diagnose) @@@STEP_LOG_LINE@ResourceProviderTests_ResourceProviderTest.TransferInvalidSoftware_1@ResourceProviderTests/ResourceProviderTest.TransferInvalidSoftware/1 (run #1):@@@ @@@STEP_LOG_LINE@ResourceProviderTests_ResourceProviderTest.TransferInvalidSoftware_1@[ RUN ] ResourceProviderTests/ResourceProviderTest.TransferInvalidSoftware/1@@@ @@@STEP_LOG_LINE@ResourceProviderTests_ResourceProviderTest.TransferInvalidSoftware_1@[17114:17114:0529/180822:15336467671:INFO:SkPixelRef.cpp(168)] ../../third_party/skia/src/core/SkPixelRef.cpp:168: failed assertion "pixels"@@@ Original issue's description: > add asserts around results from requestLock (patchset #3 id:40001 of https://codereview.chromium.org/1155403003/)" > > This reverts commit 3953d360417655b8000df0951699121383db45c3. > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/6980f5a96455c8062403c995a64b654a0e9a1319 TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1151573009
* add asserts around results from requestLock (patchset #3 id:40001 of ↵Gravatar reed2015-05-29
| | | | | | | | | | | https://codereview.chromium.org/1155403003/)" This reverts commit 3953d360417655b8000df0951699121383db45c3. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1165583005
* 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
* 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
* remove deprecated use of bitmap config from testsGravatar commit-bot@chromium.org2014-03-05
| | | | | | | | | | | BUG=skia: R=halcanary@google.com, reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/184233003 git-svn-id: http://skia.googlecode.com/svn/trunk@13666 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkBitmap now really stores SkImageInfo -- config is just a ruseGravatar commit-bot@chromium.org2014-02-11
| | | | | | | | | | | BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/159653004 git-svn-id: http://skia.googlecode.com/svn/trunk@13411 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unnamed namespace usage from tests/Gravatar tfarina@chromium.org2014-01-21
| | | | | | | | | | | | | Skia preference is to use 'static' keyword rather than use unnamed namespace. BUG=None TEST=tests R=robertphillips@google.com, bsalomon@google.com Review URL: https://codereview.chromium.org/132403008 git-svn-id: http://skia.googlecode.com/svn/trunk@13138 2bbb7eff-a529-9590-31e7-b0007b416f81
* use some helper Make functions to initialize SkImageInfoGravatar commit-bot@chromium.org2014-01-15
| | | | | | | | | | | BUG= R=halcanary@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/137993012 git-svn-id: http://skia.googlecode.com/svn/trunk@13081 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/132643007/Gravatar commit-bot@chromium.org2014-01-13
| | | | | | | | | | | | | | | Reason for revert: broken tests TBR= NOTREECHECKS=true NOTRY=true BUG= Author: reed@google.com Review URL: https://codereview.chromium.org/134843008 git-svn-id: http://skia.googlecode.com/svn/trunk@13058 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of https://codereview.chromium.org/129423002/"Gravatar reed@google.com2014-01-13
| | | | | | | | | | | | fixed new api references in unit tests This reverts commit ffc0058e1fbcbd69617e1f41b2dce5b5765ff99e. BUG= Review URL: https://codereview.chromium.org/132643007 git-svn-id: http://skia.googlecode.com/svn/trunk@13057 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/129423002/Gravatar commit-bot@chromium.org2014-01-13
| | | | | | | | | | | | | | | | Reason for revert: broke tests (compile) R=scroggo@google.com, halcanary@google.com TBR=halcanary@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG= Author: reed@google.com Review URL: https://codereview.chromium.org/137133003 git-svn-id: http://skia.googlecode.com/svn/trunk@13056 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkBitmap::installPixelRef()Gravatar reed@google.com2014-01-13
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/129423002 git-svn-id: http://skia.googlecode.com/svn/trunk@13055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update all callsites to use info for pixelrefsGravatar reed@google.com2013-12-13
| | | | | | | | | | | #define SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR in chrome to keep old API signature (for now) BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/100723005 git-svn-id: http://skia.googlecode.com/svn/trunk@12677 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12665 & r12666 (Remove duplicate impl for SkImageInfo flattening) ↵Gravatar robertphillips@google.com2013-12-13
| | | | | | | | | | due to Chromium/Blink compilation errors https://codereview.chromium.org/112603003/ git-svn-id: http://skia.googlecode.com/svn/trunk@12667 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remvoe duplicate impl for SkImageInfo flatteningGravatar reed@google.com2013-12-13
| | | | | | | | | | | | Add onNewLockPixels This reverts commit bb8eff6a70c52b7644391cfd4f4d21bf7294a6bf. BUG= Review URL: https://codereview.chromium.org/111323005 git-svn-id: http://skia.googlecode.com/svn/trunk@12665 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "remvoe duplicate impl for SkImageInfo flattening"Gravatar reed@google.com2013-12-11
| | | | | | | | | | | | Reason: breaks chrome_mac_tests which still have non-imageinfo constructors This reverts commit a06b8cf60b39bda93e9ef1a73579007b2b930d29. BUG= Review URL: https://codereview.chromium.org/103033005 git-svn-id: http://skia.googlecode.com/svn/trunk@12631 2bbb7eff-a529-9590-31e7-b0007b416f81
* remvoe duplicate impl for SkImageInfo flatteningGravatar reed@google.com2013-12-11
| | | | | | | | | | | | Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""""" This reverts commit eabd6b2ed4e494b323c08f32358f45950a0368c3. BUG= Review URL: https://codereview.chromium.org/108773003 git-svn-id: http://skia.googlecode.com/svn/trunk@12624 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "PixelRef now returns (nearly) everything that is currently in ↵Gravatar reed@google.com2013-12-11
| | | | | | | | | | | | SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""""" This reverts commit d08eca87a0bef10112a211de540f89656a80b86a. BUG= Review URL: https://codereview.chromium.org/108303003 git-svn-id: http://skia.googlecode.com/svn/trunk@12623 2bbb7eff-a529-9590-31e7-b0007b416f81
* PixelRef now returns (nearly) everything that is currently in SkBitmap. The ↵Gravatar reed@google.com2013-12-11
| | | | | | | | | | goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""" BUG= Review URL: https://codereview.chromium.org/110503003 git-svn-id: http://skia.googlecode.com/svn/trunk@12622 2bbb7eff-a529-9590-31e7-b0007b416f81
* make info real in SkPixelRef, and add bitmap::asImageInfoGravatar reed@google.com2013-12-09
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/108663004 git-svn-id: http://skia.googlecode.com/svn/trunk@12586 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "Revert "PixelRef now returns (nearly) everything that is ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | | | currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap.""" This reverts commit 5f035e90d6dea0139a4f204b634e7b7b3b4976d7. Reverting because it breaks chrome/blink due to new SkPixelRef constructor arg. BUG= Review URL: https://codereview.chromium.org/108993002 git-svn-id: http://skia.googlecode.com/svn/trunk@12551 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "PixelRef now returns (nearly) everything that is currently ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."" This reverts commit 4174afb18a9746bbad2a06c0ec2d4ad35f72d790. BUG= Review URL: https://codereview.chromium.org/108723003 git-svn-id: http://skia.googlecode.com/svn/trunk@12547 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "PixelRef now returns (nearly) everything that is currently in ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | | | SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap." This reverts commit 154e08b2f5904ef533da694e3510befcb9a3f3e2. revert due to warnings Review URL: https://codereview.chromium.org/108513003 git-svn-id: http://skia.googlecode.com/svn/trunk@12538 2bbb7eff-a529-9590-31e7-b0007b416f81
* PixelRef now returns (nearly) everything that is currently in SkBitmap. The ↵Gravatar reed@google.com2013-12-06
| | | | | | | | | | goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap. R=mtklein@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/68973005 git-svn-id: http://skia.googlecode.com/svn/trunk@12537 2bbb7eff-a529-9590-31e7-b0007b416f81
* We want to give SkPixelRef a way to signal over to GrResourceCache that it's ↵Gravatar commit-bot@chromium.org2013-10-24
become pointless to keep around textures based on that SkPixelRef when its pixels change, so that it can be a good citizen and free those textures. This adds an invalidation listener mechanism to SkPixelRef to let it send this message while still staying ignorant of who's listening. These messages are tricky to deliver. The SkPixelRefs they originates from and the GrResourceCaches they ultimately end up at may be on different threads; neither class is threadsafe; their object lifetimes are totally independent; it's a many-senders-to-many-receivers relation; and neither codebase should really know about the other. So I've added a per-message-type global message bus to broadcast messages to threadsafe inboxes. Anyone can post() a message, which will show up in all the inboxes of that type, read whenever the inbox's owner calls poll(). The implementation is _dumb_; it can be improved in several dimensions (inbox size limits, lock-free message delivery) if we find the need. I took some care to make sure not to send the invalidation message for any SkPixelRef that's sharing a generation ID with another SkPixelRef. BUG= R=bsalomon@google.com, scroggo@google.com, reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26734003 git-svn-id: http://skia.googlecode.com/svn/trunk@11949 2bbb7eff-a529-9590-31e7-b0007b416f81