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

Unified Diff: src/gpu/GrContext.cpp

Issue 459033002: Change GR_COMPRESS_ALPHA_MASK from compile-time flag to run-time flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Code cleanup Created 6 years, 4 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/GrContext.h ('k') | src/gpu/GrSWMaskHelper.cpp » ('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 96380bdfe66995a73532acbd8999a279507673d4..5f69d08bf3c46b1e1d1b27d36d11cdb53a8d76a2 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -84,8 +84,15 @@ private:
GrContext* fContext;
};
-GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext) {
- GrContext* context = SkNEW(GrContext);
+GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext,
+ const Options* opts) {
+ GrContext* context;
+ if (NULL == opts) {
+ context = SkNEW_ARGS(GrContext, (Options()));
+ } else {
+ context = SkNEW_ARGS(GrContext, (*opts));
+ }
+
if (context->init(backend, backendContext)) {
return context;
} else {
@@ -94,7 +101,7 @@ GrContext* GrContext::Create(GrBackend backend, GrBackendContext backendContext)
}
}
-GrContext::GrContext() {
+GrContext::GrContext(const Options& opts) : fOptions(opts) {
fDrawState = NULL;
fGpu = NULL;
fClip = NULL;
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698