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

Unified Diff: src/gpu/SkGrPriv.h

Issue 1370223002: Revert[4] of add ImageShader, sharing code with its Bitmap cousin (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
Index: src/gpu/SkGrPriv.h
diff --git a/src/gpu/SkGrPriv.h b/src/gpu/SkGrPriv.h
index 1564d31bc936c1b39447a8cd4e7cf9dd7f366cfd..25fda57d9ec8668ec8781fcbf1b5e5e0e2bb3528 100644
--- a/src/gpu/SkGrPriv.h
+++ b/src/gpu/SkGrPriv.h
@@ -9,6 +9,7 @@
#define SkGrPriv_DEFINED
#include "GrTypes.h"
+#include "GrTextureAccess.h"
#include "SkImageInfo.h"
#include "SkXfermode.h"
@@ -31,6 +32,8 @@ struct SkGrStretch {
int fHeight;
};
+GrTextureParams GrImageUsageToTextureParams(SkImageUsageType);
+
/**
* Our key includes the offset, width, and height so that bitmaps created by extractSubset()
* are unique.
@@ -45,6 +48,11 @@ struct SkGrStretch {
void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& imageBounds,
const GrCaps&, SkImageUsageType);
+/**
+ * Given an "unstretched" key, and a stretch rec, produce a stretched key.
robertphillips 2015/09/30 19:25:56 Returns false if the stretched key cannot be creat
+ */
+bool GrMakeStretchedKey(const GrUniqueKey& origKey, const SkGrStretch&, GrUniqueKey* stretchedKey);
+
/** Converts an SkPaint to a GrPaint for a given GrContext. The matrix is required in order
to convert the SkShader (if any) on the SkPaint. */
bool SkPaintToGrPaint(GrContext*,
@@ -76,4 +84,6 @@ bool SkPaintToGrPaintWithXfermode(GrContext* context,
bool primitiveIsSrc,
GrPaint* grPaint);
+bool GrTextureUsageSupported(const GrCaps&, int width, int height, SkImageUsageType);
+
#endif

Powered by Google App Engine
This is Rietveld 408576698