Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Issue 510423005: make allocPixels throw on failure (Closed)

Created:
6 years, 3 months ago by reed1
Modified:
6 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

make allocPixels throw on failure BUG=skia: Committed: https://skia.googlesource.com/skia/+/848250415eddc54075f7eb8795e8db79e749c6ab

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : renamed Check to Try -- just in SkBitmap.h -- is this better? #

Patch Set 5 : renamed to tryAllocPixels #

Patch Set 6 : yet more allocPixels variants (need to reduce these in the future) #

Patch Set 7 : update 2 tests that wanted to fail (silently) on allocpixels #

Patch Set 8 : change legacy behavior to not throw on failure for non-try versions #

Patch Set 9 : can't use (void) to suppress the "must check return result" #

Total comments: 4

Patch Set 10 : rebase + address SkBitmap.h comment #

Patch Set 11 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -116 lines) Patch
M gyp/skia_for_chromium_defines.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkBitmap.h View 1 2 3 4 5 6 7 8 9 5 chunks +55 lines, -13 lines 0 comments Download
M samplecode/SampleApp.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M samplecode/SampleFilterFuzz.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M samplecode/SampleUnpremul.cpp View 1 1 chunk +1 line, -5 lines 0 comments Download
M src/core/SkBitmap.cpp View 1 2 3 4 5 6 chunks +7 lines, -7 lines 0 comments Download
M src/core/SkBitmapDevice.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M src/core/SkPictureShader.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkScalerContext.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkAlphaThresholdFilter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkBlurImageFilter.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/GrSWMaskHelper.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrSurface.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M src/gpu/SkGrPixelRef.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/image/SkImage.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M src/images/SkDecodingImageGenerator.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkImageDecoder.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkImageDecoder_libjpeg.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkImageDecoder_libpng.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkImageDecoder_libwebp.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkMovie_gif.cpp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M src/lazy/SkCachingPixelRef.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/lazy/SkDiscardablePixelRef.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/pdf/SkPDFImage.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/utils/SkPDFRasterizer.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/utils/mac/SkCreateCGImageRef.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M tests/ARGBImageEncoderTest.cpp View 1 1 chunk +2 lines, -3 lines 0 comments Download
M tests/BitmapCopyTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -6 lines 0 comments Download
M tests/BitmapHasherTest.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M tests/BitmapTest.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tests/CachedDecodingPixelRefTest.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M tests/DrawBitmapRectTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M tests/ImageDecodingTest.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tests/KtxTest.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M tests/PathOpsSkpClipTest.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M tests/ReadPixelsTest.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M tests/SerializationTest.cpp View 1 4 chunks +9 lines, -16 lines 0 comments Download
M tests/SkResourceCacheTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M tests/TextureCompressionTest.cpp View 1 4 chunks +4 lines, -8 lines 0 comments Download
M tests/WritePixelsTest.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 42 (12 generated)
reed1
WIP
6 years, 3 months ago (2014-08-29 17:52:49 UTC) #2
mtklein
https://codereview.chromium.org/510423005/diff/1/include/core/SkBitmap.h File include/core/SkBitmap.h (right): https://codereview.chromium.org/510423005/diff/1/include/core/SkBitmap.h#newcode229 include/core/SkBitmap.h:229: bool allocPixelsCheck(const SkImageInfo&, SkPixelRefFactory*, SkColorTable*); tryAllocPixels? allocPixelsCheck sounds a ...
6 years, 3 months ago (2014-08-29 17:59:49 UTC) #3
f(malita)
https://codereview.chromium.org/510423005/diff/1/include/core/SkBitmap.h File include/core/SkBitmap.h (right): https://codereview.chromium.org/510423005/diff/1/include/core/SkBitmap.h#newcode260 include/core/SkBitmap.h:260: * On failure, the bitmap will be set to ...
6 years, 3 months ago (2014-08-29 18:21:15 UTC) #5
reed1
On 2014/08/29 17:59:49, mtklein wrote: > https://codereview.chromium.org/510423005/diff/1/include/core/SkBitmap.h > File include/core/SkBitmap.h (right): > > https://codereview.chromium.org/510423005/diff/1/include/core/SkBitmap.h#newcode229 > ...
6 years, 3 months ago (2014-09-02 12:23:23 UTC) #6
reed1
6 years, 3 months ago (2014-09-02 12:26:43 UTC) #7
reed1
ptal
6 years, 3 months ago (2014-09-02 13:43:04 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/510423005/80001
6 years, 3 months ago (2014-09-02 14:23:04 UTC) #10
reed1
I *think* the canary failure is just that that bot did not re-run runhooks, to ...
6 years, 3 months ago (2014-09-02 14:23:05 UTC) #11
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 3 months ago (2014-09-02 14:23:05 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Ubuntu13.10-Clang-x86_64-Debug-Trybot on tryserver.skia ...
6 years, 3 months ago (2014-09-02 14:28:37 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot/builds/506) Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot/builds/479)
6 years, 3 months ago (2014-09-02 14:29:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/510423005/90001
6 years, 3 months ago (2014-09-02 15:29:54 UTC) #17
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 3 months ago (2014-09-02 15:29:55 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on tryserver.skia ...
6 years, 3 months ago (2014-09-02 15:36:19 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-Shared-Trybot/builds/483)
6 years, 3 months ago (2014-09-02 15:40:10 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/510423005/130001
6 years, 3 months ago (2014-09-02 16:10:28 UTC) #23
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 3 months ago (2014-09-02 16:10:29 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Ubuntu13.10-GCC4.8-Arm7-Debug-Android-Trybot on tryserver.skia ...
6 years, 3 months ago (2014-09-02 16:18:33 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu13.10-GCC4.8-Arm7-Debug-Android-Trybot on tryserver.skia (http://108.170.220.76:10117/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Debug-Android-Trybot/builds/1257)
6 years, 3 months ago (2014-09-02 16:21:54 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/510423005/150001
6 years, 3 months ago (2014-09-02 16:58:33 UTC) #29
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 3 months ago (2014-09-02 16:58:34 UTC) #30
reed1
PTAL
6 years, 3 months ago (2014-09-02 17:46:48 UTC) #31
mtklein
Some nice cleanup across our tests here. https://codereview.chromium.org/510423005/diff/150001/include/core/SkBitmap.h File include/core/SkBitmap.h (right): https://codereview.chromium.org/510423005/diff/150001/include/core/SkBitmap.h#newcode231 include/core/SkBitmap.h:231: bool tryAllocPixels(const ...
6 years, 3 months ago (2014-09-02 18:50:26 UTC) #32
reed1
https://codereview.chromium.org/510423005/diff/150001/include/core/SkBitmap.h File include/core/SkBitmap.h (right): https://codereview.chromium.org/510423005/diff/150001/include/core/SkBitmap.h#newcode231 include/core/SkBitmap.h:231: bool tryAllocPixels(const SkImageInfo&, SkPixelRefFactory*, SkColorTable*); On 2014/09/02 18:50:26, mtklein ...
6 years, 3 months ago (2014-09-02 19:35:28 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/510423005/170001
6 years, 3 months ago (2014-09-02 19:36:49 UTC) #35
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years, 3 months ago (2014-09-02 19:36:50 UTC) #36
commit-bot: I haz the power
Failed to apply patch for tests/ScaledImageCache.cpp: While running git apply --index -p1; error: tests/ScaledImageCache.cpp: does ...
6 years, 3 months ago (2014-09-02 19:37:02 UTC) #38
mtklein
lgtm
6 years, 3 months ago (2014-09-02 19:38:13 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/510423005/190001
6 years, 3 months ago (2014-09-02 19:43:04 UTC) #41
commit-bot: I haz the power
6 years, 3 months ago (2014-09-02 19:50:51 UTC) #42
Message was sent while issue was closed.
Committed patchset #11 (id:190001) as 848250415eddc54075f7eb8795e8db79e749c6ab

Powered by Google App Engine
This is Rietveld 408576698