Remove assert about top left origin in lazy image generator unique key.
Bug: skia:8421
Change-Id: I0af5add66eb0209b1a523a79c7777a98793c97df
Reviewed-on: https://skia-review.googlesource.com/157571
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/image/SkImage_Lazy.cpp b/src/image/SkImage_Lazy.cpp
index 6aa0ca0..e1f987b 100644
--- a/src/image/SkImage_Lazy.cpp
+++ b/src/image/SkImage_Lazy.cpp
@@ -372,7 +372,6 @@
GrTextureProxy* proxy, GrTextureProxy* originalProxy,
const GrUniqueKey& key) {
if (key.isValid()) {
- SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin);
if (originalProxy && originalProxy->getUniqueKey().isValid()) {
SkASSERT(originalProxy->getUniqueKey() == key);
SkASSERT(GrMipMapped::kYes == proxy->mipMapped() &&
@@ -430,6 +429,10 @@
enum { kLockTexturePathCount = kRGBA_LockTexturePath + 1 };
// Build our texture key.
+ // Even though some proxies created here may have a specific origin and use that origin, we do
+ // not include that in the key. Since SkImages are meant to be immutable, a given SkImage will
+ // always have an associated proxy that is always one origin or the other. It never can change
+ // origins. Thus we don't need to include that info in the key iteself.
// TODO: This needs to include the dstColorSpace.
GrUniqueKey key;
this->makeCacheKeyFromOrigKey(origKey, &key);