projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa9193d
)
utils/win/SkTScopedComPtr: reset(T*)
author
Hal Canary
<halcanary@google.com>
Wed, 21 Dec 2016 13:18:51 +0000
(08:18 -0500)
committer
Skia Commit-Bot
<skia-commit-bot@chromium.org>
Wed, 21 Dec 2016 14:56:42 +0000
(14:56 +0000)
Change-Id: I59a687569e2c7b69cdf65ebc9656c7fbffcc32e0
Motivation: to be used by SkXPS.
Reviewed-on: https://skia-review.googlesource.com/6355
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
src/utils/win/SkTScopedComPtr.h
patch
|
blob
|
history
diff --git
a/src/utils/win/SkTScopedComPtr.h
b/src/utils/win/SkTScopedComPtr.h
index
5410f5c
..
105b601
100644
(file)
--- a/
src/utils/win/SkTScopedComPtr.h
+++ b/
src/utils/win/SkTScopedComPtr.h
@@
-57,11
+57,11
@@
public:
T *get() const { return fPtr; }
- void reset() {
- if (this->fPtr) {
- this->fPtr->Release();
- this->fPtr = nullptr;
+ void reset(T* ptr = nullptr) {
+ if (fPtr) {
+ fPtr->Release();
}
+ fPtr = ptr;
}
void swap(SkTScopedComPtr<T>& that) {