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

Unified Diff: tools/android/SkAndroidSDKCanvas.cpp

Issue 1784563002: unify peekPixels around pixmap parameter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update GrUploadPixmapToTexture to know about the new desc if readPixels was called Created 4 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 | « tests/SurfaceTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/SkAndroidSDKCanvas.cpp
diff --git a/tools/android/SkAndroidSDKCanvas.cpp b/tools/android/SkAndroidSDKCanvas.cpp
index 45fcc758f211a5679c30053c8b436409ad1a9e65..1deb97cbc67cb603574c505e6d57567f5b1d1b6c 100644
--- a/tools/android/SkAndroidSDKCanvas.cpp
+++ b/tools/android/SkAndroidSDKCanvas.cpp
@@ -292,15 +292,7 @@ SkSurface* SkAndroidSDKCanvas::onNewSurface(const SkImageInfo& info,
}
bool SkAndroidSDKCanvas::onPeekPixels(SkPixmap* pmap) {
- SkASSERT(pmap);
- SkImageInfo info;
- size_t rowBytes;
- const void* addr = fProxyTarget->peekPixels(&info, &rowBytes);
- if (addr) {
- pmap->reset(info, addr, rowBytes);
- return true;
- }
- return false;
+ return fProxyTarget->peekPixels(pmap);
}
bool SkAndroidSDKCanvas::onAccessTopLayerPixels(SkPixmap* pmap) {
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698