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

Unified Diff: include/gpu/GrTextureAccess.h

Issue 563963004: Make templated GrProgramTResource subclass of GrProgramResource (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 3 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 | « include/gpu/GrProgramResource.h ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTextureAccess.h
diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h
index 3d44d9e44f1f084928da2a5f3bb21741759df09d..2fd17375b05b9595a84ad617fcb8fd193f48a6ba 100644
--- a/include/gpu/GrTextureAccess.h
+++ b/include/gpu/GrTextureAccess.h
@@ -8,11 +8,10 @@
#ifndef GrTextureAccess_DEFINED
#define GrTextureAccess_DEFINED
+#include "GrProgramResource.h"
+#include "GrTexture.h"
#include "SkRefCnt.h"
#include "SkShader.h"
-#include "GrProgramResource.h"
-
-class GrTexture;
/**
* Represents the filtering and tile modes used to access a texture. It is mostly used with
@@ -163,12 +162,12 @@ public:
bool operator!= (const GrTextureAccess& other) const { return !(*this == other); }
- GrTexture* getTexture() const { return (GrTexture*)fTexture.getResource(); }
+ GrTexture* getTexture() const { return fTexture.get(); }
/**
* For internal use by GrEffect.
*/
- const GrProgramResource* getTextureProgramResource() const { return &fTexture; }
+ const GrProgramResource* getProgramTexture() const { return &fTexture; }
/**
* Returns a string representing the swizzle. The string is is null-terminated.
@@ -184,7 +183,9 @@ public:
private:
void setSwizzle(const char*);
- GrProgramResource fTexture;
+ typedef GrProgramTResource<GrTexture> ProgramTexture;
+
+ ProgramTexture fTexture;
GrTextureParams fParams;
uint32_t fSwizzleMask;
char fSwizzle[5];
« no previous file with comments | « include/gpu/GrProgramResource.h ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698