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

Unified Diff: src/gpu/SkGrPriv.h

Issue 1291803002: Extend SkImageGenerator to support natively generated GrTextures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/SkGr.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGrPriv.h
diff --git a/src/gpu/SkGrPriv.h b/src/gpu/SkGrPriv.h
new file mode 100644
index 0000000000000000000000000000000000000000..4688adb0451eaaf89dcc44a7604b61c7926951b2
--- /dev/null
+++ b/src/gpu/SkGrPriv.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkGrPriv_DEFINED
+#define SkGrPriv_DEFINED
+
+#include "GrTypes.h"
+#include "SkPoint.h"
+
+class GrCaps;
+class GrUniqueKey;
+
+/**
+ * Our key includes the offset, width, and height so that bitmaps created by extractSubset()
+ * are unique.
+ *
+ * The imageID is in the shared namespace (see SkNextID::ImageID()
+ * - SkBitmap/SkPixelRef
+ * - SkImage
+ * - SkImageGenerator
+ *
+ * Note: width/height must fit in 16bits for this impl.
+ */
+void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID,
+ U16CPU width, U16CPU height, SkIPoint origin,
+ const GrCaps&, SkImageUsageType);
+
+#endif
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698