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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2111423002: Fix caching of sample locations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Some chrome bots don't have map::emplace. Created 4 years, 5 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/gl/GrGLGpu.h ('k') | src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 2fb66804e007b78e3f1ecc2888c1fe4cc46a3053..99726904873a4f5df4b5feecaa909fc68d2a5fb9 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -4432,10 +4432,8 @@ bool GrGLGpu::generateMipmap(GrGLTexture* texture, bool gammaCorrect) {
return true;
}
-void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt,
- const GrStencilSettings& stencil,
- int* effectiveSampleCnt,
- SkAutoTDeleteArray<SkPoint>* sampleLocations) {
+void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings& stencil,
+ int* effectiveSampleCnt, SamplePattern* samplePattern) {
SkASSERT(!rt->hasMixedSamples() || rt->renderTargetPriv().getStencilAttachment() ||
stencil.isDisabled());
@@ -4452,14 +4450,14 @@ void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt,
SkASSERT(*effectiveSampleCnt >= rt->desc().fSampleCnt);
if (this->caps()->sampleLocationsSupport()) {
- sampleLocations->reset(new SkPoint[*effectiveSampleCnt]);
+ samplePattern->reset(*effectiveSampleCnt);
for (int i = 0; i < *effectiveSampleCnt; ++i) {
GrGLfloat pos[2];
GL_CALL(GetMultisamplefv(GR_GL_SAMPLE_POSITION, i, pos));
if (kTopLeft_GrSurfaceOrigin == rt->origin()) {
- (*sampleLocations)[i].set(pos[0], pos[1]);
+ (*samplePattern)[i].set(pos[0], pos[1]);
} else {
- (*sampleLocations)[i].set(pos[0], 1 - pos[1]);
+ (*samplePattern)[i].set(pos[0], 1 - pos[1]);
}
}
}
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698