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

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

Issue 950363002: Notify resource caches when pixelref genID goes stale (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 5 years, 10 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 | « src/core/SkMaskCache.cpp ('k') | src/core/SkPixelRef.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 #include "SkPictureShader.h" 8 #include "SkPictureShader.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 29 matching lines...) Expand all
40 fLocalMatrixStorage[i] = localMatrix[i]; 40 fLocalMatrixStorage[i] = localMatrix[i];
41 } 41 }
42 42
43 static const size_t keySize = sizeof(fPictureID) + 43 static const size_t keySize = sizeof(fPictureID) +
44 sizeof(fTile) + 44 sizeof(fTile) +
45 sizeof(fTmx) + sizeof(fTmy) + 45 sizeof(fTmx) + sizeof(fTmy) +
46 sizeof(fScale) + 46 sizeof(fScale) +
47 sizeof(fLocalMatrixStorage); 47 sizeof(fLocalMatrixStorage);
48 // This better be packed. 48 // This better be packed.
49 SkASSERT(sizeof(uint32_t) * (&fEndOfStruct - &fPictureID) == keySize); 49 SkASSERT(sizeof(uint32_t) * (&fEndOfStruct - &fPictureID) == keySize);
50 this->init(&gBitmapSkaderKeyNamespaceLabel, keySize); 50 this->init(&gBitmapSkaderKeyNamespaceLabel, 0, keySize);
51 } 51 }
52 52
53 private: 53 private:
54 uint32_t fPictureID; 54 uint32_t fPictureID;
55 SkRect fTile; 55 SkRect fTile;
56 SkShader::TileMode fTmx, fTmy; 56 SkShader::TileMode fTmx, fTmy;
57 SkSize fScale; 57 SkSize fScale;
58 SkScalar fLocalMatrixStorage[9]; 58 SkScalar fLocalMatrixStorage[9];
59 59
60 SkDEBUGCODE(uint32_t fEndOfStruct;) 60 SkDEBUGCODE(uint32_t fEndOfStruct;)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 return bitmapShader->asFragmentProcessor(context, paint, viewM, NULL, paintC olor, fp); 303 return bitmapShader->asFragmentProcessor(context, paint, viewM, NULL, paintC olor, fp);
304 } 304 }
305 #else 305 #else
306 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa trix&, 306 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa trix&,
307 const SkMatrix*, GrColor*, 307 const SkMatrix*, GrColor*,
308 GrFragmentProcessor**) const { 308 GrFragmentProcessor**) const {
309 SkDEBUGFAIL("Should not call in GPU-less build"); 309 SkDEBUGFAIL("Should not call in GPU-less build");
310 return false; 310 return false;
311 } 311 }
312 #endif 312 #endif
OLDNEW
« no previous file with comments | « src/core/SkMaskCache.cpp ('k') | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698