Index: src/core/SkPixmap.cpp |
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2d15e8a1857ba9f93a3862a9bfddc4e383bc0b6c |
--- /dev/null |
+++ b/src/core/SkPixmap.cpp |
@@ -0,0 +1,18 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#include "SkPixmap.h" |
+ |
+void SkAutoPixmapUnlock::reset(const SkPixmap& pm, void (*unlock)(void*), void* ctx) { |
+ SkASSERT(pm.addr() != NULL); |
+ |
+ this->unlock(); |
+ fPixmap = pm; |
+ fUnlockProc = unlock; |
+ fUnlockContext = ctx; |
+ fIsLocked = true; |
+} |