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

Unified Diff: include/gpu/SkGr.h

Issue 1315353006: refactor parts of SkGr.cpp for use by SkImages (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix nits 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
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrYUVProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/SkGr.h
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h
index db318b0b4cef14438b45f5e85622bdb47967bf2d..7dd1aff456e8b06004fbf54c51ec557a98887455 100644
--- a/include/gpu/SkGr.h
+++ b/include/gpu/SkGr.h
@@ -69,11 +69,27 @@ static inline GrColor SkColor2GrColorJustAlpha(SkColor c) {
////////////////////////////////////////////////////////////////////////////////
+/**
+ * If the compressed data in the SkData is supported (as a texture format, this returns
+ * the pixel-config that should be used, and sets outStartOfDataToUpload to the ptr into
+ * the data where the actual raw data starts (skipping any header bytes).
+ *
+ * If the compressed data is not supported, this returns kUnknown_GrPixelConfig, and
+ * ignores outStartOfDataToUpload.
+ */
+GrPixelConfig GrIsCompressedTextureDataSupported(GrContext* ctx, SkData* data,
+ int expectedW, int expectedH,
+ const void** outStartOfDataToUpload);
+
bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams*);
GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTextureParams*);
GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, SkImageUsageType);
+GrTexture* GrCreateTextureForPixels(GrContext*, const GrUniqueKey& optionalKey, GrSurfaceDesc,
+ SkPixelRef* pixelRefForInvalidationNotificationOrNull,
+ const void* pixels, size_t rowBytesOrZero);
+
////////////////////////////////////////////////////////////////////////////////
// Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader.
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrYUVProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698