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

Unified Diff: src/core/SkBitmapDevice.cpp

Issue 197433002: support direct writing to top layer (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 | « include/utils/SkDeferredCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapDevice.cpp
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 098f0fc96ce95b9c12710cfb2f938a7e0e55cc40..8524f0b72b4312746d10a307767bda14b6e7acb8 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -268,6 +268,15 @@ void SkBitmapDevice::writePixels(const SkBitmap& bitmap,
}
#endif
+void* SkBitmapDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) {
+ if (fBitmap.getPixels()) {
+ *info = fBitmap.info();
+ *rowBytes = fBitmap.rowBytes();
+ return fBitmap.getPixels();
+ }
+ return NULL;
+}
+
static void rect_memcpy(void* dst, size_t dstRB, const void* src, size_t srcRB, size_t bytesPerRow,
int rowCount) {
SkASSERT(bytesPerRow <= srcRB);
« no previous file with comments | « include/utils/SkDeferredCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698