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

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

Issue 83343003: Adding more validation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixed comments Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | 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 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapSource.h" 8 #include "SkBitmapSource.h"
9 9
10 SkBitmapSource::SkBitmapSource(const SkBitmap& bitmap) 10 SkBitmapSource::SkBitmapSource(const SkBitmap& bitmap)
11 : INHERITED(0), 11 : INHERITED(0, 0),
12 fBitmap(bitmap) { 12 fBitmap(bitmap) {
13 } 13 }
14 14
15 SkBitmapSource::SkBitmapSource(SkFlattenableReadBuffer& buffer) 15 SkBitmapSource::SkBitmapSource(SkFlattenableReadBuffer& buffer)
16 : INHERITED(buffer) { 16 : INHERITED(0, buffer) {
17 fBitmap.unflatten(buffer); 17 fBitmap.unflatten(buffer);
18 } 18 }
19 19
20 void SkBitmapSource::flatten(SkFlattenableWriteBuffer& buffer) const { 20 void SkBitmapSource::flatten(SkFlattenableWriteBuffer& buffer) const {
21 this->INHERITED::flatten(buffer); 21 this->INHERITED::flatten(buffer);
22 fBitmap.flatten(buffer); 22 fBitmap.flatten(buffer);
23 } 23 }
24 24
25 bool SkBitmapSource::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&, 25 bool SkBitmapSource::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&,
26 SkBitmap* result, SkIPoint* offset) { 26 SkBitmap* result, SkIPoint* offset) {
27 *result = fBitmap; 27 *result = fBitmap;
28 return true; 28 return true;
29 } 29 }
OLDNEW
« no previous file with comments | « src/effects/SkBicubicImageFilter.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698