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

Unified Diff: src/gpu/effects/GrTextureDomain.h

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month 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/effects/GrSingleTextureEffect.h ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureDomain.h
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index 82ff73c066207f7d84bc97ef788334c5188bea57..c15c7028b7ab4ce6507d0d4e8c6034aea14bae53 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -60,9 +60,9 @@ public:
/* Computes a domain that bounds all the texels in texelRect. Note that with bilerp enabled
texels neighboring the domain may be read. */
- static const SkRect MakeTexelDomain(const GrTexture* texture, const SkIRect& texelRect) {
- SkScalar wInv = SK_Scalar1 / texture->width();
- SkScalar hInv = SK_Scalar1 / texture->height();
+ static const SkRect MakeTexelDomain(int width, int height, const SkIRect& texelRect) {
+ SkScalar wInv = SK_Scalar1 / width;
+ SkScalar hInv = SK_Scalar1 / height;
SkRect result = {
texelRect.fLeft * wInv,
texelRect.fTop * hInv,
@@ -173,6 +173,13 @@ public:
GrTextureDomain::Mode,
GrTextureParams::FilterMode filterMode);
+ static sk_sp<GrFragmentProcessor> Make(GrTextureProxy*,
+ sk_sp<GrColorSpaceXform>,
+ const SkMatrix&,
+ const SkRect& domain,
+ GrTextureDomain::Mode,
+ GrTextureParams::FilterMode filterMode);
+
const char* name() const override { return "TextureDomain"; }
SkString dumpInfo() const override {
@@ -212,6 +219,9 @@ public:
static sk_sp<GrFragmentProcessor> Make(GrTexture*, const SkIRect& subset,
const SkIPoint& deviceSpaceOffset);
+ static sk_sp<GrFragmentProcessor> Make(GrTextureProxy*, const SkIRect& subset,
+ const SkIPoint& deviceSpaceOffset);
+
const char* name() const override { return "GrDeviceSpaceTextureDecalFragmentProcessor"; }
SkString dumpInfo() const override {
« no previous file with comments | « src/gpu/effects/GrSingleTextureEffect.h ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698