public:
/**
* New device that will create an offscreen renderTarget based on the
- * config, width, height, and sampleCount. The device's storage will not
- * count against the GrContext's texture cache budget. The device's pixels
+ * config, width, height, and sampleCount. The device's storage will not
+ * count against the GrContext's texture cache budget. The device's pixels
* will be uninitialized.
*/
SkGpuDevice(GrContext*, SkBitmap::Config, int width, int height, int sampleCount = 0);
// is relying on the texture.
class GrTFindUnreffedFunctor {
public:
- bool operator()(const GrResourceEntry* entry) const {
+ bool operator()(const GrResourceEntry* entry) const {
return 1 == entry->resource()->getRefCnt();
}
};
return NULL != fCache.find(key);
}
-void GrResourceCache::addResource(const GrResourceKey& key,
+void GrResourceCache::addResource(const GrResourceKey& key,
GrResource* resource,
uint32_t ownershipFlags) {
GrAssert(NULL == resource->getCacheEntry());
#endif
if (entry->resource()->isValid()) {
- // Since scratch textures still count against the cache budget even
- // when they have been removed from the cache, re-adding them doesn't
+ // Since scratch textures still count against the cache budget even
+ // when they have been removed from the cache, re-adding them doesn't
// alter the budget information.
attachToHead(entry, kIgnore_BudgetBehavior);
fCache.insert(entry->key(), entry);
/**
* Search for an entry with the same Key. If found, return it.
* If not found, return null.
- * If ownershipFlags includes kNoOtherOwners and a resource is returned
+ * If ownershipFlags includes kNoOtherOwners and a resource is returned
* then that resource has no other refs to it.
* If ownershipFlags includes kHide and a resource is returned then that
* resource will not be returned from future 'find' calls until it is
* For a resource to be completely exclusive to a caller both kNoOtherOwners
* and kHide must be specified.
*/
- GrResource* find(const GrResourceKey& key,
+ GrResource* find(const GrResourceKey& key,
uint32_t ownershipFlags = 0);
/**
- * Add the new resource to the cache (by creating a new cache entry based
- * on the provided key and resource).
+ * Add the new resource to the cache (by creating a new cache entry based
+ * on the provided key and resource).
*
* Ownership of the resource is transferred to the resource cache,
* which will unref() it when it is purged or deleted.
*
* If ownershipFlags includes kHide, subsequent calls to 'find' will not
- * return 'resource' until it is 'freed' (and recycled) or makeNonExclusive
+ * return 'resource' until it is 'freed' (and recycled) or makeNonExclusive
* is called.
*/
- void addResource(const GrResourceKey& key,
+ void addResource(const GrResourceKey& key,
GrResource* resource,
uint32_t ownershipFlags = 0);
SkTextureImageSetTexture(image, NULL);
return;
}
-
+
fDevice->context()->copyTexture(rt->asTexture(), tex->asRenderTarget());
SkTextureImageSetTexture(image, tex);
if (NULL == tex) {
return NULL;
}
-
+
return SkNEW_ARGS(SkSurface_Gpu, (ctx, tex->asRenderTarget()));
}
}
void SkSurface_Picture::onCopyOnWrite(SkImage* cachedImage, SkCanvas*) {
- // We always spawn a copy of the recording picture when we
+ // We always spawn a copy of the recording picture when we
// are asked for a snapshot, so we never need to do anything here.
}