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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1124633003: Revert of Start on simplifying generateGeometry() overrides (Closed) Base URL: https://skia.googlesource.com/skia.git@ibcache
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 7ae2c99825109125117da824b5b99e9a52f1b7f3..850309797cf7d7e63b502aaaac2757dc4962e5a4 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -37,8 +37,16 @@
fVerticesPerInstance = di.fVerticesPerInstance;
fIndicesPerInstance = di.fIndicesPerInstance;
- fVertexBuffer.reset(di.vertexBuffer());
- fIndexBuffer.reset(di.indexBuffer());
+ if (di.fDevBounds) {
+ SkASSERT(di.fDevBounds == &di.fDevBoundsStorage);
+ fDevBoundsStorage = di.fDevBoundsStorage;
+ fDevBounds = &fDevBoundsStorage;
+ } else {
+ fDevBounds = NULL;
+ }
+
+ this->setVertexBuffer(di.vertexBuffer());
+ this->setIndexBuffer(di.indexBuffer());
return *this;
}
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698