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

Side by Side Diff: src/core/SkImageFilter.cpp

Issue 770703002: Bump min picture version. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: TODO Created 6 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
« no previous file with comments | « src/core/SkFlattenable.cpp ('k') | src/core/SkLocalMatrixShader.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 "SkImageFilter.h" 8 #include "SkImageFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 } 94 }
95 SkRect rect; 95 SkRect rect;
96 buffer.readRect(&rect); 96 buffer.readRect(&rect);
97 if (!buffer.isValid() || !buffer.validate(SkIsValidRect(rect))) { 97 if (!buffer.isValid() || !buffer.validate(SkIsValidRect(rect))) {
98 return false; 98 return false;
99 } 99 }
100 100
101 uint32_t flags = buffer.readUInt(); 101 uint32_t flags = buffer.readUInt();
102 fCropRect = CropRect(rect, flags); 102 fCropRect = CropRect(rect, flags);
103 if (buffer.isVersionLT(SkReadBuffer::kImageFilterUniqueID_Version)) { 103 fUniqueID = buffer.readUInt();
104 fUniqueID = next_image_filter_unique_id();
105 } else {
106 fUniqueID = buffer.readUInt();
107 }
108 return buffer.isValid(); 104 return buffer.isValid();
109 } 105 }
110 106
111 //////////////////////////////////////////////////////////////////////////////// /////////////////// 107 //////////////////////////////////////////////////////////////////////////////// ///////////////////
112 108
113 SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropR ect* cropRect, uint32_t uniqueID) 109 SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropR ect* cropRect, uint32_t uniqueID)
114 : fInputCount(inputCount), 110 : fInputCount(inputCount),
115 fInputs(new SkImageFilter*[inputCount]), 111 fInputs(new SkImageFilter*[inputCount]),
116 fUsesSrcInput(false), 112 fUsesSrcInput(false),
117 fCropRect(cropRect ? *cropRect : CropRect(SkRect(), 0x0)), 113 fCropRect(cropRect ? *cropRect : CropRect(SkRect(), 0x0)),
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 488
493 SkImageFilter::Cache* SkImageFilter::Cache::Create(size_t maxBytes) { 489 SkImageFilter::Cache* SkImageFilter::Cache::Create(size_t maxBytes) {
494 return SkNEW_ARGS(CacheImpl, (maxBytes)); 490 return SkNEW_ARGS(CacheImpl, (maxBytes));
495 } 491 }
496 492
497 SK_DECLARE_STATIC_LAZY_PTR(SkImageFilter::Cache, cache, CreateCache); 493 SK_DECLARE_STATIC_LAZY_PTR(SkImageFilter::Cache, cache, CreateCache);
498 494
499 SkImageFilter::Cache* SkImageFilter::Cache::Get() { 495 SkImageFilter::Cache* SkImageFilter::Cache::Get() {
500 return cache.get(); 496 return cache.get();
501 } 497 }
OLDNEW
« no previous file with comments | « src/core/SkFlattenable.cpp ('k') | src/core/SkLocalMatrixShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698