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

Unified Diff: dm/DMSrcSink.cpp

Issue 1448883002: Make NVPR a GL context option instead of a GL context (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-02-other-tests-refactor
Patch Set: rebase Created 5 years 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 | « dm/DMSrcSink.h ('k') | src/gpu/GrContextFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index a4fb028eb01621eba89fbb5ba3dddaae89cb4d8f..2503dc35cec207602df6e50d9f66a518d108f2d1 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -789,12 +789,14 @@ Error NullSink::draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const {
DEFINE_bool(gpuStats, false, "Append GPU stats to the log for each GPU task?");
GPUSink::GPUSink(GrContextFactory::GLContextType ct,
- GrGLStandard api,
+ GrContextFactory::GLContextOptions options,
+ GrGLStandard gpuAPI,
int samples,
bool diText,
bool threaded)
: fContextType(ct)
- , fGpuAPI(api)
+ , fContextOptions(options)
+ , fGpuAPI(gpuAPI)
, fSampleCount(samples)
, fUseDIText(diText)
, fThreaded(threaded) {}
@@ -810,24 +812,26 @@ DEFINE_bool(batchClip, false, "Clip each GrBatch to its device bounds for testin
DEFINE_bool(batchBounds, false, "Draw a wireframe bounds of each GrBatch.");
Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) const {
- GrContextOptions options;
+ GrContextOptions grOptions;
if (FLAGS_imm) {
- options.fImmediateMode = true;
+ grOptions.fImmediateMode = true;
}
if (FLAGS_batchClip) {
- options.fClipBatchToBounds = true;
+ grOptions.fClipBatchToBounds = true;
}
+
if (FLAGS_batchBounds) {
- options.fDrawBatchBounds = true;
+ grOptions.fDrawBatchBounds = true;
}
- src.modifyGrContextOptions(&options);
+ src.modifyGrContextOptions(&grOptions);
- GrContextFactory factory(options);
+ GrContextFactory factory(grOptions);
const SkISize size = src.size();
const SkImageInfo info =
SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul_SkAlphaType);
SkAutoTUnref<SkSurface> surface(
- NewGpuSurface(&factory, fContextType, fGpuAPI, info, fSampleCount, fUseDIText));
+ NewGpuSurface(&factory, fContextType, fContextOptions, fGpuAPI, info, fSampleCount,
+ fUseDIText));
if (!surface) {
return "Could not create a surface.";
}
« no previous file with comments | « dm/DMSrcSink.h ('k') | src/gpu/GrContextFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698