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

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

Issue 2225303002: Add flag for window rectangles to GrRenderTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add GrRenderTarget flag for window rectangles Created 4 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 | « src/gpu/GrRenderTargetProxy.cpp ('k') | src/gpu/gl/GrGLRenderTarget.h » ('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 c91a0f46fab04eb9b448af9fa3e8bf2d57ce241e..1300bb7a03bd4deb1e510c515ea35824eff2c69c 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -722,7 +722,7 @@ GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe
} else {
idDesc.fRTFBOOwnership = GrBackendObjectOwnership::kBorrowed;
}
- idDesc.fSampleConfig = GrRenderTarget::kUnified_SampleConfig;
+ idDesc.fIsMixedSampled = false;
GrSurfaceDesc desc;
desc.fConfig = wrapDesc.fConfig;
@@ -1505,7 +1505,7 @@ bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc,
idDesc->fTexFBOID = 0;
SkASSERT((GrGLCaps::kMixedSamples_MSFBOType == this->glCaps().msFBOType()) ==
this->caps()->usesMixedSamples());
- idDesc->fSampleConfig = GrRenderTarget::ComputeSampleConfig(*this->caps(), desc.fSampleCnt);
+ idDesc->fIsMixedSampled = desc.fSampleCnt > 0 && this->caps()->usesMixedSamples();
GrGLenum status;
@@ -2971,7 +2971,7 @@ void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabl
}
if (0 != this->caps()->maxRasterSamples()) {
- if (useHWAA && rt->hasMixedSamples() && !stencilEnabled) {
+ if (useHWAA && rt->isMixedSampled() && !stencilEnabled) {
// Since stencil is disabled and we want more samples than are in the color buffer, we
// need to tell the rasterizer explicitly how many to run.
if (kYes_TriState != fHWRasterMultisampleEnabled) {
@@ -2990,7 +2990,7 @@ void GrGLGpu::flushHWAAState(GrRenderTarget* rt, bool useHWAA, bool stencilEnabl
}
}
} else {
- SkASSERT(!useHWAA || !rt->hasMixedSamples() || stencilEnabled);
+ SkASSERT(!useHWAA || !rt->isMixedSampled() || stencilEnabled);
}
}
@@ -4440,7 +4440,7 @@ bool GrGLGpu::generateMipmap(GrGLTexture* texture, bool gammaCorrect) {
void GrGLGpu::onGetMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings& stencil,
int* effectiveSampleCnt, SamplePattern* samplePattern) {
- SkASSERT(!rt->hasMixedSamples() || rt->renderTargetPriv().getStencilAttachment() ||
+ SkASSERT(!rt->isMixedSampled() || rt->renderTargetPriv().getStencilAttachment() ||
stencil.isDisabled());
this->flushStencil(stencil);
« no previous file with comments | « src/gpu/GrRenderTargetProxy.cpp ('k') | src/gpu/gl/GrGLRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698