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

Unified Diff: src/core/SkPixmap.cpp

Issue 1074983003: add SkPixmap and external locking to bitmaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 7 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
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;
+}

Powered by Google App Engine
This is Rietveld 408576698