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

Side by Side Diff: include/core/SkImageFilter.h

Issue 1210053003: Fix SkTileImageFilter clipping/cropRect interaction issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments Created 5 years, 6 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 | « gm/cropdisp.cpp ('k') | src/core/SkImageFilter.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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 #ifndef SkImageFilter_DEFINED 8 #ifndef SkImageFilter_DEFINED
9 #define SkImageFilter_DEFINED 9 #define SkImageFilter_DEFINED
10 10
(...skipping 28 matching lines...) Expand all
39 kHasLeft_CropEdge = 0x01, 39 kHasLeft_CropEdge = 0x01,
40 kHasTop_CropEdge = 0x02, 40 kHasTop_CropEdge = 0x02,
41 kHasRight_CropEdge = 0x04, 41 kHasRight_CropEdge = 0x04,
42 kHasBottom_CropEdge = 0x08, 42 kHasBottom_CropEdge = 0x08,
43 kHasAll_CropEdge = 0x0F, 43 kHasAll_CropEdge = 0x0F,
44 }; 44 };
45 CropRect() {} 45 CropRect() {}
46 explicit CropRect(const SkRect& rect, uint32_t flags = kHasAll_CropEdge) : fRect(rect), fFlags(flags) {} 46 explicit CropRect(const SkRect& rect, uint32_t flags = kHasAll_CropEdge) : fRect(rect), fFlags(flags) {}
47 uint32_t flags() const { return fFlags; } 47 uint32_t flags() const { return fFlags; }
48 const SkRect& rect() const { return fRect; } 48 const SkRect& rect() const { return fRect; }
49 #ifndef SK_IGNORE_TO_STRING
50 void toString(SkString* str) const;
51 #endif
49 private: 52 private:
50 SkRect fRect; 53 SkRect fRect;
51 uint32_t fFlags; 54 uint32_t fFlags;
52 }; 55 };
53 56
54 // This cache maps from (filter's unique ID + CTM + clipBounds + src bitmap generation ID) to 57 // This cache maps from (filter's unique ID + CTM + clipBounds + src bitmap generation ID) to
55 // (result, offset). 58 // (result, offset).
56 class Cache : public SkRefCnt { 59 class Cache : public SkRefCnt {
57 public: 60 public:
58 struct Key; 61 struct Key;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 */ 367 */
365 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ 368 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \
366 Common localVar; \ 369 Common localVar; \
367 do { \ 370 do { \
368 if (!localVar.unflatten(buffer, expectedCount)) { \ 371 if (!localVar.unflatten(buffer, expectedCount)) { \
369 return NULL; \ 372 return NULL; \
370 } \ 373 } \
371 } while (0) 374 } while (0)
372 375
373 #endif 376 #endif
OLDNEW
« no previous file with comments | « gm/cropdisp.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698