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

Unified Diff: src/core/SkCanvas.cpp

Issue 1550583002: remove unused SkAutoROCanvasPixels (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index d72ec7ffc965755af60554decdceb7949659ee51..a76f5a3b9f1709f6b5ed4b9d4509f148143cb603 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1395,31 +1395,6 @@ bool SkCanvas::onAccessTopLayerPixels(SkPixmap* pmap) {
return dev && dev->accessPixels(pmap);
}
-SkAutoROCanvasPixels::SkAutoROCanvasPixels(SkCanvas* canvas) {
- fAddr = canvas->peekPixels(&fInfo, &fRowBytes);
- if (nullptr == fAddr) {
- fInfo = canvas->imageInfo();
- if (kUnknown_SkColorType == fInfo.colorType() || !fBitmap.tryAllocPixels(fInfo)) {
- return; // failure, fAddr is nullptr
- }
- if (!canvas->readPixels(&fBitmap, 0, 0)) {
- return; // failure, fAddr is nullptr
- }
- fAddr = fBitmap.getPixels();
- fRowBytes = fBitmap.rowBytes();
- }
- SkASSERT(fAddr); // success
-}
-
-bool SkAutoROCanvasPixels::asROBitmap(SkBitmap* bitmap) const {
- if (fAddr) {
- return bitmap->installPixels(fInfo, const_cast<void*>(fAddr), fRowBytes);
- } else {
- bitmap->reset();
- return false;
- }
-}
-
/////////////////////////////////////////////////////////////////////////////
void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y,
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698