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

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

Issue 213123014: Revert of Implement text rendering with NVPR (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « include/core/SkPaint.h ('k') | src/gpu/GrContext.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 2010 Google Inc. 2 * Copyright 2010 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 GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
(...skipping 17 matching lines...) Expand all
28 class GrIndexBuffer; 28 class GrIndexBuffer;
29 class GrIndexBufferAllocPool; 29 class GrIndexBufferAllocPool;
30 class GrInOrderDrawBuffer; 30 class GrInOrderDrawBuffer;
31 class GrOvalRenderer; 31 class GrOvalRenderer;
32 class GrPath; 32 class GrPath;
33 class GrPathRenderer; 33 class GrPathRenderer;
34 class GrResourceEntry; 34 class GrResourceEntry;
35 class GrResourceCache; 35 class GrResourceCache;
36 class GrStencilBuffer; 36 class GrStencilBuffer;
37 class GrTestTarget; 37 class GrTestTarget;
38 class GrTextContext;
39 class GrTextureParams; 38 class GrTextureParams;
40 class GrVertexBuffer; 39 class GrVertexBuffer;
41 class GrVertexBufferAllocPool; 40 class GrVertexBufferAllocPool;
42 class GrSoftwarePathRenderer; 41 class GrSoftwarePathRenderer;
43 class SkStrokeRec; 42 class SkStrokeRec;
44 43
45 class SK_API GrContext : public SkRefCnt { 44 class SK_API GrContext : public SkRefCnt {
46 public: 45 public:
47 SK_DECLARE_INST_COUNT(GrContext) 46 SK_DECLARE_INST_COUNT(GrContext)
48 47
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 /** 109 /**
111 * Returns the number of bytes of GPU memory hosted by the texture cache. 110 * Returns the number of bytes of GPU memory hosted by the texture cache.
112 */ 111 */
113 size_t getGpuTextureCacheBytes() const; 112 size_t getGpuTextureCacheBytes() const;
114 113
115 /** 114 /**
116 * Returns the number of resources hosted by the texture cache. 115 * Returns the number of resources hosted by the texture cache.
117 */ 116 */
118 int getGpuTextureCacheResourceCount() const; 117 int getGpuTextureCacheResourceCount() const;
119 118
120 /**
121 * Creates a new text rendering context that is optimal for the
122 * render target and the context. Caller assumes the ownership
123 * of the returned object. The returned object must be deleted
124 * before the context is destroyed.
125 */
126 GrTextContext* createTextContext(GrRenderTarget*,
127 const SkDeviceProperties&);
128
129 /////////////////////////////////////////////////////////////////////////// 119 ///////////////////////////////////////////////////////////////////////////
130 // Textures 120 // Textures
131 121
132 /** 122 /**
133 * Creates a new entry, based on the specified key and texture and returns i t. The caller owns a 123 * Creates a new entry, based on the specified key and texture and returns i t. The caller owns a
134 * ref on the returned texture which must be balanced by a call to unref. 124 * ref on the returned texture which must be balanced by a call to unref.
135 * 125 *
136 * @param params The texture params used to draw a texture may help deter mine 126 * @param params The texture params used to draw a texture may help deter mine
137 * the cache entry used. (e.g. different versions may exist 127 * the cache entry used. (e.g. different versions may exist
138 * for different wrap modes on GPUs with limited NPOT 128 * for different wrap modes on GPUs with limited NPOT
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 GrTexture* createResizedTexture(const GrTextureDesc& desc, 947 GrTexture* createResizedTexture(const GrTextureDesc& desc,
958 const GrCacheID& cacheID, 948 const GrCacheID& cacheID,
959 void* srcData, 949 void* srcData,
960 size_t rowBytes, 950 size_t rowBytes,
961 bool filter); 951 bool filter);
962 952
963 // Needed so GrTexture's returnToCache helper function can call 953 // Needed so GrTexture's returnToCache helper function can call
964 // addExistingTextureToCache 954 // addExistingTextureToCache
965 friend class GrTexture; 955 friend class GrTexture;
966 friend class GrStencilAndCoverPathRenderer; 956 friend class GrStencilAndCoverPathRenderer;
967 friend class GrStencilAndCoverTextContext;
968 957
969 // Add an existing texture to the texture cache. This is intended solely 958 // Add an existing texture to the texture cache. This is intended solely
970 // for use with textures released from an GrAutoScratchTexture. 959 // for use with textures released from an GrAutoScratchTexture.
971 void addExistingTextureToCache(GrTexture* texture); 960 void addExistingTextureToCache(GrTexture* texture);
972 961
973 /** 962 /**
974 * These functions create premul <-> unpremul effects if it is possible to g enerate a pair 963 * These functions create premul <-> unpremul effects if it is possible to g enerate a pair
975 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O therwise, they 964 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O therwise, they
976 * return NULL. 965 * return NULL.
977 */ 966 */
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 } 1069 }
1081 1070
1082 GrTexture* texture() { return fTexture; } 1071 GrTexture* texture() { return fTexture; }
1083 1072
1084 private: 1073 private:
1085 GrContext* fContext; 1074 GrContext* fContext;
1086 GrTexture* fTexture; 1075 GrTexture* fTexture;
1087 }; 1076 };
1088 1077
1089 #endif 1078 #endif
OLDNEW
« no previous file with comments | « include/core/SkPaint.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698