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

Unified Diff: src/core/SkImageFilter.cpp

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: SkEffectType -> SkFlattenable::Type Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 46d9ee4b9b007c64de7452e88c45a6247293db95..94cb30f20d12b074f3109bdeb39da0710f3f2625 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -10,6 +10,7 @@
#include "SkBitmap.h"
#include "SkFlattenableBuffers.h"
#include "SkRect.h"
+#include "SkValidationUtils.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrTexture.h"
@@ -65,6 +66,7 @@ SkImageFilter::SkImageFilter(SkFlattenableReadBuffer& buffer)
buffer.readRect(&rect);
uint32_t flags = buffer.readUInt();
fCropRect = CropRect(rect, flags);
+ buffer.validate(SkIsValidRect(rect));
}
void SkImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {

Powered by Google App Engine
This is Rietveld 408576698