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

Unified Diff: src/gpu/GrTextureProvider.cpp

Issue 1709163003: Add wrapBackendTextureAsRenderTarget API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Remove assert that is no longer true Created 4 years, 10 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/gpu/GrTextureProvider.cpp
diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp
index 7d720eb1212dd0455953892c75e550155975fe03..bc9653fe1ef1f85ee081379ccf0d3e6053966c00 100644
--- a/src/gpu/GrTextureProvider.cpp
+++ b/src/gpu/GrTextureProvider.cpp
@@ -138,6 +138,15 @@ GrRenderTarget* GrTextureProvider::wrapBackendRenderTarget(const GrBackendRender
kBorrow_GrWrapOwnership);
}
+GrRenderTarget* GrTextureProvider::wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& desc,
+ GrWrapOwnership ownership) {
+ ASSERT_SINGLE_OWNER
+ if (this->isAbandoned()) {
+ return nullptr;
+ }
+ return fGpu->wrapBackendTextureAsRenderTarget(desc, ownership);
+}
+
void GrTextureProvider::assignUniqueKeyToResource(const GrUniqueKey& key, GrGpuResource* resource) {
ASSERT_SINGLE_OWNER
if (this->isAbandoned() || !resource) {

Powered by Google App Engine
This is Rietveld 408576698