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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1993403002: GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 81b6fe861435138cc34267d53626bd8cca56c691..df58a9251f6e9b54c7d3a696d6268d18d6061fb7 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -384,7 +384,7 @@ bool GrClipMaskManager::setupClipping(const GrPipelineBuilder& pipelineBuilder,
if (UseSWOnlyPath(this->getContext(), pipelineBuilder, rt, clipToMaskOffset, elements)) {
// The clip geometry is complex enough that it will be more efficient to create it
// entirely in software
- result = CreateSoftwareClipMask(this->getContext(),
+ result = CreateSoftwareClipMask(this->getContext()->textureProvider(),
genID,
initialState,
elements,
@@ -791,7 +791,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
////////////////////////////////////////////////////////////////////////////////
sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
- GrContext* context,
+ GrTextureProvider* texProvider,
int32_t elementsGenID,
GrReducedClip::InitialState initialState,
const GrReducedClip::ElementList& elements,
@@ -799,8 +799,7 @@ sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
const SkIRect& clipSpaceIBounds) {
GrUniqueKey key;
GetClipMaskKey(elementsGenID, clipSpaceIBounds, &key);
- GrResourceProvider* resourceProvider = context->resourceProvider();
- if (GrTexture* texture = resourceProvider->findAndRefTextureByUniqueKey(key)) {
+ if (GrTexture* texture = texProvider->findAndRefTextureByUniqueKey(key)) {
return sk_sp<GrTexture>(texture);
}
@@ -808,7 +807,7 @@ sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
// the top left corner of the resulting rect to the top left of the texture.
SkIRect maskSpaceIBounds = SkIRect::MakeWH(clipSpaceIBounds.width(), clipSpaceIBounds.height());
- GrSWMaskHelper helper(context);
+ GrSWMaskHelper helper(texProvider);
// Set the matrix so that rendered clip elements are transformed to mask space from clip
// space.
@@ -857,7 +856,7 @@ sk_sp<GrTexture> GrClipMaskManager::CreateSoftwareClipMask(
desc.fHeight = clipSpaceIBounds.height();
desc.fConfig = kAlpha_8_GrPixelConfig;
- sk_sp<GrTexture> result(context->resourceProvider()->createApproxTexture(desc, 0));
+ sk_sp<GrTexture> result(texProvider->createApproxTexture(desc));
if (!result) {
return nullptr;
}
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698