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

Unified Diff: src/gpu/SkGpuDevice.h

Issue 2168483003: Deprecate SkDevice::accessBitmap method (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 5 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/core/SkDevice.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.h
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
index 0b1e6a3cd9a32b2f92d63c2cb31be9655fdd7a78..d341b39ed6d26aca2cf135f050fd2ac7343d900a 100644
--- a/src/gpu/SkGpuDevice.h
+++ b/src/gpu/SkGpuDevice.h
@@ -81,7 +81,10 @@ public:
GrDrawContext* accessDrawContext() override;
SkImageInfo imageInfo() const override {
- return fLegacyBitmap.info();
+ SkAlphaType at = fOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
+ SkImageInfo info = fRenderTarget->surfacePriv().info(at).makeWH(fSize.fWidth,
reed1 2016/07/21 14:13:59 We could land this right-away, on its own, correct
robertphillips 2016/07/21 14:16:51 Acknowledged.
+ fSize.fHeight);
+ return info;
}
void drawPaint(const SkDraw&, const SkPaint& paint) override;
@@ -141,7 +144,6 @@ public:
void onAttachToCanvas(SkCanvas* canvas) override;
void onDetachFromCanvas() override;
- const SkBitmap& onAccessBitmap() override;
bool onAccessPixels(SkPixmap*) override;
// for debugging purposes only
@@ -161,8 +163,7 @@ private:
SkAutoTUnref<const SkClipStack> fClipStack;
SkIPoint fClipOrigin;
GrClipStackClip fClip;
- // remove when our clients don't rely on accessBitmap()
- SkBitmap fLegacyBitmap;
+ SkISize fSize;
bool fOpaque;
enum Flags {
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698