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

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

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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/doc/SkDocument.cpp ('k') | src/effects/SkLayerDrawLooper.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 2013 Google Inc. 2 * Copyright 2013 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 "SkBitmapAlphaThresholdShader.h" 8 #include "SkBitmapAlphaThresholdShader.h"
9 9
10 class BATShader : public SkShader { 10 class BATShader : public SkShader {
(...skipping 16 matching lines...) Expand all
27 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(BATShader) 27 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(BATShader)
28 28
29 private: 29 private:
30 SkBitmap fBitmap; 30 SkBitmap fBitmap;
31 SkRegion fRegion; 31 SkRegion fRegion;
32 U8CPU fThreshold; 32 U8CPU fThreshold;
33 33
34 typedef SkShader INHERITED; 34 typedef SkShader INHERITED;
35 }; 35 };
36 36
37 SK_DEFINE_INST_COUNT(BATShader)
38
39 SkShader* SkBitmapAlphaThresholdShader::Create(const SkBitmap& bitmap, 37 SkShader* SkBitmapAlphaThresholdShader::Create(const SkBitmap& bitmap,
40 const SkRegion& region, 38 const SkRegion& region,
41 U8CPU threshold) { 39 U8CPU threshold) {
42 SkASSERT(threshold < 256); 40 SkASSERT(threshold < 256);
43 return SkNEW_ARGS(BATShader, (bitmap, region, threshold)); 41 return SkNEW_ARGS(BATShader, (bitmap, region, threshold));
44 } 42 }
45 43
46 BATShader::BATShader(const SkBitmap& bitmap, SkRegion region, U8CPU threshold) 44 BATShader::BATShader(const SkBitmap& bitmap, SkRegion region, U8CPU threshold)
47 : fBitmap(bitmap) 45 : fBitmap(bitmap)
48 , fRegion(region) 46 , fRegion(region)
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 GrEffectRef* effect = ThresholdEffect::Create(bmpTexture, bmpMatrix, 268 GrEffectRef* effect = ThresholdEffect::Create(bmpTexture, bmpMatrix,
271 maskTexture, maskMatrix, 269 maskTexture, maskMatrix,
272 fThreshold); 270 fThreshold);
273 271
274 GrUnlockAndUnrefCachedBitmapTexture(bmpTexture); 272 GrUnlockAndUnrefCachedBitmapTexture(bmpTexture);
275 273
276 return effect; 274 return effect;
277 } 275 }
278 276
279 #endif 277 #endif
OLDNEW
« no previous file with comments | « src/doc/SkDocument.cpp ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698