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

Side by Side Diff: include/gpu/GrTBackendEffectFactory.h

Issue 171413004: Analytic rrect clip for cicular corners, radius >= .5 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix windows warning in rrects.cpp Created 6 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkRRect.h ('k') | src/gpu/GrClipMaskManager.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 Google Inc. 2 * Copyright 2012 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 GrTBackendEffectFactory_DEFINED 8 #ifndef GrTBackendEffectFactory_DEFINED
9 #define GrTBackendEffectFactory_DEFINED 9 #define GrTBackendEffectFactory_DEFINED
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return (fEffectClassID << (kEffectKeyBits+kTextureKeyBits+kTransformKeyB its+kAttribKeyBits)) | 57 return (fEffectClassID << (kEffectKeyBits+kTextureKeyBits+kTransformKeyB its+kAttribKeyBits)) |
58 (attribKey << (kEffectKeyBits+kTextureKeyBits+kTransformKeyBits)) | 58 (attribKey << (kEffectKeyBits+kTextureKeyBits+kTransformKeyBits)) |
59 (transformKey << (kEffectKeyBits+kTextureKeyBits)) | 59 (transformKey << (kEffectKeyBits+kTextureKeyBits)) |
60 (textureKey << kEffectKeyBits) | 60 (textureKey << kEffectKeyBits) |
61 (effectKey); 61 (effectKey);
62 } 62 }
63 63
64 /** Returns a new instance of the appropriate *GL* implementation class 64 /** Returns a new instance of the appropriate *GL* implementation class
65 for the given GrEffect; caller is responsible for deleting 65 for the given GrEffect; caller is responsible for deleting
66 the object. */ 66 the object. */
67 virtual GLEffect* createGLInstance(const GrDrawEffect& drawEffect) const SK_ OVERRIDE { 67 virtual GrGLEffect* createGLInstance(const GrDrawEffect& drawEffect) const S K_OVERRIDE {
68 return SkNEW_ARGS(GLEffect, (*this, drawEffect)); 68 return SkNEW_ARGS(GLEffect, (*this, drawEffect));
69 } 69 }
70 70
71 /** This class is a singleton. This function returns the single instance. 71 /** This class is a singleton. This function returns the single instance.
72 */ 72 */
73 static const GrBackendEffectFactory& getInstance() { 73 static const GrBackendEffectFactory& getInstance() {
74 static SkAlignedSTStorage<1, GrTBackendEffectFactory> gInstanceMem; 74 static SkAlignedSTStorage<1, GrTBackendEffectFactory> gInstanceMem;
75 static const GrTBackendEffectFactory* gInstance; 75 static const GrTBackendEffectFactory* gInstance;
76 if (!gInstance) { 76 if (!gInstance) {
77 gInstance = SkNEW_PLACEMENT(gInstanceMem.get(), 77 gInstance = SkNEW_PLACEMENT(gInstanceMem.get(),
78 GrTBackendEffectFactory); 78 GrTBackendEffectFactory);
79 } 79 }
80 return *gInstance; 80 return *gInstance;
81 } 81 }
82 82
83 protected: 83 protected:
84 GrTBackendEffectFactory() { 84 GrTBackendEffectFactory() {
85 fEffectClassID = GenID(); 85 fEffectClassID = GenID();
86 } 86 }
87 }; 87 };
88 88
89 #endif 89 #endif
OLDNEW
« no previous file with comments | « include/core/SkRRect.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698