Add fallback for asyncRescaleAndReadPixelsYUV420 without PBOs.
Uses synchronous read pixels.
Change-Id: I6dac88a6d33a4771fc3108b43825a2f10dd7b51d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267044
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrSurfaceContext.h b/src/gpu/GrSurfaceContext.h
index 4c83840..f1efa72 100644
--- a/src/gpu/GrSurfaceContext.h
+++ b/src/gpu/GrSurfaceContext.h
@@ -9,12 +9,12 @@
#define GrSurfaceContext_DEFINED
#include "include/core/SkFilterQuality.h"
-#include "include/core/SkImageInfo.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSurface.h"
#include "src/gpu/GrColorInfo.h"
#include "src/gpu/GrDataUtils.h"
+#include "src/gpu/GrImageInfo.h"
#include "src/gpu/GrSurfaceProxy.h"
#include "src/gpu/GrSurfaceProxyView.h"
@@ -57,6 +57,8 @@
virtual ~GrSurfaceContext() = default;
const GrColorInfo& colorInfo() const { return fColorInfo; }
+ GrImageInfo imageInfo() const { return {fColorInfo, fReadView.proxy()->dimensions()}; }
+
GrSurfaceOrigin origin() const { return fReadView.origin(); }
GrSwizzle readSwizzle() const { return fReadView.swizzle(); }
// TODO: See if it makes sense for this to return a const& instead and require the callers to