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

Side by Side Diff: src/core/SkPictureShader.h

Issue 240303003: Fix memory leak in SkGradientShader. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: getCache -> refCache; buildBitmapShader -> refBitmapShader Created 6 years, 8 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 | « no previous file | src/core/SkPictureShader.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 2014 Google Inc. 2 * Copyright 2014 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 SkPictureShader_DEFINED 8 #ifndef SkPictureShader_DEFINED
9 #define SkPictureShader_DEFINED 9 #define SkPictureShader_DEFINED
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 protected: 62 protected:
63 SkPictureShader(SkReadBuffer&); 63 SkPictureShader(SkReadBuffer&);
64 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 64 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
65 65
66 private: 66 private:
67 SkPictureShader(SkPicture*, TileMode, TileMode); 67 SkPictureShader(SkPicture*, TileMode, TileMode);
68 68
69 SkShader* validInternal(const SkBitmap& device, const SkPaint& paint, 69 SkShader* validInternal(const SkBitmap& device, const SkPaint& paint,
70 const SkMatrix& matrix, SkMatrix* totalInverse) cons t; 70 const SkMatrix& matrix, SkMatrix* totalInverse) cons t;
71 71
72 SkShader* buildBitmapShader(const SkMatrix&) const; 72 SkShader* refBitmapShader(const SkMatrix&) const;
73 73
74 SkPicture* fPicture; 74 SkPicture* fPicture;
75 TileMode fTmx, fTmy; 75 TileMode fTmx, fTmy;
76 76
77 mutable SkMutex fCachedBitmapShaderMutex; 77 mutable SkMutex fCachedBitmapShaderMutex;
78 mutable SkAutoTUnref<SkShader> fCachedBitmapShader; 78 mutable SkAutoTUnref<SkShader> fCachedBitmapShader;
79 mutable SkSize fCachedTileScale; 79 mutable SkSize fCachedTileScale;
80 mutable SkMatrix fCachedLocalMatrix; 80 mutable SkMatrix fCachedLocalMatrix;
81 81
82 typedef SkShader INHERITED; 82 typedef SkShader INHERITED;
83 }; 83 };
84 84
85 #endif // SkPictureShader_DEFINED 85 #endif // SkPictureShader_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698