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

Unified Diff: src/core/SkDevice.cpp

Issue 211043002: remove all references to legacy Config8888 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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/SkCanvas.cpp ('k') | src/device/xps/SkXPSDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 4c75a36363e428a3455ebef5b09246fc193e62fd..299d44533dd80fd2ae22635764f42f87fd9d90b8 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -102,54 +102,6 @@ const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) {
return bitmap;
}
-#ifdef SK_SUPPORT_LEGACY_READPIXELSCONFIG
-bool SkBaseDevice::readPixels(SkBitmap* bitmap, int x, int y,
- SkCanvas::Config8888 config8888) {
- if (SkBitmap::kARGB_8888_Config != bitmap->config() ||
- NULL != bitmap->getTexture()) {
- return false;
- }
-
- const SkBitmap& src = this->accessBitmap(false);
-
- SkIRect srcRect = SkIRect::MakeXYWH(x, y, bitmap->width(),
- bitmap->height());
- SkIRect devbounds = SkIRect::MakeWH(src.width(), src.height());
- if (!srcRect.intersect(devbounds)) {
- return false;
- }
-
- SkBitmap tmp;
- SkBitmap* bmp;
- if (bitmap->isNull()) {
- if (!tmp.allocPixels(SkImageInfo::MakeN32Premul(bitmap->width(),
- bitmap->height()))) {
- return false;
- }
- bmp = &tmp;
- } else {
- bmp = bitmap;
- }
-
- SkIRect subrect = srcRect;
- subrect.offset(-x, -y);
- SkBitmap bmpSubset;
- bmp->extractSubset(&bmpSubset, subrect);
-
- bool result = this->onReadPixels(bmpSubset,
- srcRect.fLeft,
- srcRect.fTop,
- config8888);
- if (result && bmp == &tmp) {
- tmp.swap(*bitmap);
- }
- return result;
-}
-bool SkBaseDevice::onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config8888) {
- return false;
-}
-#endif
-
SkSurface* SkBaseDevice::newSurface(const SkImageInfo&) { return NULL; }
const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; }
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/device/xps/SkXPSDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698