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

Unified Diff: src/effects/SkTileImageFilter.cpp

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Adapting code to sk_once changes 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
« no previous file with comments | « src/effects/SkTestImageFilters.cpp ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTileImageFilter.cpp
diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp
index a7374ade0c6a0c743d148cec1e575b04e0d9a93f..8cc096cf370043b4ecbd813bb171305cef43126f 100644
--- a/src/effects/SkTileImageFilter.cpp
+++ b/src/effects/SkTileImageFilter.cpp
@@ -13,6 +13,7 @@
#include "SkMatrix.h"
#include "SkPaint.h"
#include "SkShader.h"
+#include "SkValidationUtils.h"
bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm,
SkBitmap* dst, SkIPoint* offset) {
@@ -56,6 +57,7 @@ bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, const S
SkTileImageFilter::SkTileImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
buffer.readRect(&fSrcRect);
buffer.readRect(&fDstRect);
+ buffer.validate(SkIsValidRect(fSrcRect) && SkIsValidRect(fDstRect));
}
void SkTileImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {
« no previous file with comments | « src/effects/SkTestImageFilters.cpp ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698