commit | 41b952c296e343eeabb07d52b6a55ba7565a286b | [log] [tgz] |
---|---|---|
author | bsalomon <bsalomon@google.com> | Fri Mar 11 06:46:33 2016 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Fri Mar 11 06:46:33 2016 -0800 |
tree | 872b3b398ad29109f1fd107d6705c71ccc4e3456 | |
parent | 6266dca7a7a991634d144cbc3a2c6cffefd67454 [diff] [blame] |
Add deferred texture upload API. Performs thread-safe decoding of SkImage in order to later create a texture-backed SkImage. The client allocates storage for the data. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776693002 Review URL: https://codereview.chromium.org/1776693002
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index a16d5c0..1f6934d 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp
@@ -128,6 +128,13 @@ fCaps->unref(); } +GrContextThreadSafeProxy* GrContext::threadSafeProxy() { + if (!fThreadSafeProxy) { + fThreadSafeProxy.reset(new GrContextThreadSafeProxy(fCaps, this->uniqueID())); + } + return SkRef(fThreadSafeProxy.get()); +} + void GrContext::abandonContext() { ASSERT_SINGLE_OWNER