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

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 150013004: Set the horizontal scanline to NULL when the vertical one fails (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use SkSafeSetNull Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 ada.reset(profile); 680 ada.reset(profile);
681 } 681 }
682 682
683 SkAutoTMalloc<uint8_t> verticalPixels(height); 683 SkAutoTMalloc<uint8_t> verticalPixels(height);
684 SkBlurMask::ComputeBlurredScanline(verticalPixels, profile, height, sigm a); 684 SkBlurMask::ComputeBlurredScanline(verticalPixels, profile, height, sigm a);
685 685
686 *verticalScanline = context->createTexture(&params, texDesc, verticalCac heID, 686 *verticalScanline = context->createTexture(&params, texDesc, verticalCac heID,
687 verticalPixels, 0); 687 verticalPixels, 0);
688 688
689 if (NULL == *verticalScanline) { 689 if (NULL == *verticalScanline) {
690 (*horizontalScanline)->unref(); 690 SkSafeSetNull(*horizontalScanline);
691 return false; 691 return false;
692 } 692 }
693 693
694 } 694 }
695 return true; 695 return true;
696 } 696 }
697 697
698 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma, 698 GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma,
699 GrTexture *horizontal_scanline, GrTexture *ve rtical_scanline) 699 GrTexture *horizontal_scanline, GrTexture *ve rtical_scanline)
700 : INHERITED(), 700 : INHERITED(),
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 } else { 897 } else {
898 str->append("None"); 898 str->append("None");
899 } 899 }
900 str->append("))"); 900 str->append("))");
901 } 901 }
902 #endif 902 #endif
903 903
904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
905 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 905 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
906 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 906 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698