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

Unified Diff: src/gpu/GrContext.cpp

Issue 1421853002: Add immediate mode option for gpu configs in dm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add assert Created 5 years, 2 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 | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 2ca3461a692917a1c2a97c2bb5a42aa8f41a1b1c..fee92fe692210cfd9102eba2d5ca10307f48c8d0 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -74,11 +74,11 @@ bool GrContext::init(GrBackend backend, GrBackendContext backendContext,
if (!fGpu) {
return false;
}
- this->initCommon();
+ this->initCommon(options);
return true;
}
-void GrContext::initCommon() {
+void GrContext::initCommon(const GrContextOptions& options) {
fCaps = SkRef(fGpu->caps());
fResourceCache = new GrResourceCache(fCaps);
fResourceCache->setOverBudgetCallback(OverBudgetCB, this);
@@ -88,7 +88,9 @@ void GrContext::initCommon() {
fDidTestPMConversions = false;
- fDrawingManager.reset(new GrDrawingManager(this));
+ GrDrawTarget::Options dtOptions;
+ dtOptions.fImmediateMode = options.fImmediateMode;
+ fDrawingManager.reset(new GrDrawingManager(this, dtOptions));
// GrBatchFontCache will eventually replace GrFontCache
fBatchFontCache = new GrBatchFontCache(this);
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698