aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMGpuSupport.h
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-12-01 05:10:48 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-01 05:10:48 -0800
commiteeebdb538d476c1bfc8b63a946094ca1b505ecd1 (patch)
treed93b4fa64b8ea8e2aaed1f797bb45ea9b5bfbb7c /dm/DMGpuSupport.h
parent1e2913e7cb8c8122151cabd0aa6c77011253e95b (diff)
Make NVPR a GL context option instead of a GL context
Make NVPR a GL context option instead of a GL context. This may enable NVPR to be run with command buffer interface. No functionality change in DM or nanobench. NVPR can only be run with normal GL APIs. BUG=skia:2992 Review URL: https://codereview.chromium.org/1448883002
Diffstat (limited to 'dm/DMGpuSupport.h')
-rw-r--r--dm/DMGpuSupport.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h
index 9f20dd51da..6a59558f55 100644
--- a/dm/DMGpuSupport.h
+++ b/dm/DMGpuSupport.h
@@ -26,13 +26,14 @@ static const bool kGPUDisabled = false;
static inline SkSurface* NewGpuSurface(GrContextFactory* grFactory,
GrContextFactory::GLContextType type,
+ GrContextFactory::GLContextOptions options,
GrGLStandard gpuAPI,
SkImageInfo info,
int samples,
bool useDIText) {
uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag : 0;
SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- return SkSurface::NewRenderTarget(grFactory->get(type, gpuAPI), SkSurface::kNo_Budgeted,
+ return SkSurface::NewRenderTarget(grFactory->get(type, gpuAPI, options), SkSurface::kNo_Budgeted,
info, samples, &props);
}
@@ -76,6 +77,10 @@ public:
kNative_GLContextType = 0,
kNull_GLContextType = 0;
static const int kGLContextTypeCnt = 1;
+ enum GLContextOptions {
+ kNone_GLContextOptions = 0,
+ kEnableNVPR_GLContextOptions = 0x1,
+ };
void destroyContexts() {}
void abandonContexts() {}
@@ -87,6 +92,7 @@ static const bool kGPUDisabled = true;
static inline SkSurface* NewGpuSurface(GrContextFactory*,
GrContextFactory::GLContextType,
+ GrContextFactory::GLContextOptions,
GrGLStandard,
SkImageInfo,
int,