Skip to content

Commit f83d034

Browse files
csmartdalton86Skia Commit-Bot
authored andcommitted
Use mixed samples in GrDynamicAtlas
Change-Id: I0871f2e87be857ebf8577b212b318054a2ad84dd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269908 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
1 parent cb1ba16 commit f83d034

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/gpu/GrDynamicAtlas.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ sk_sp<GrTextureProxy> GrDynamicAtlas::MakeLazyAtlasProxy(
5050
InternalMultisample internalMultisample, const GrCaps& caps,
5151
GrSurfaceProxy::UseAllocator useAllocator) {
5252
GrBackendFormat format = caps.getDefaultBackendFormat(colorType, GrRenderable::kYes);
53-
int sampleCount = (InternalMultisample::kYes == internalMultisample) ?
54-
caps.internalMultisampleCount(format) : 1;
53+
54+
int sampleCount = 1;
55+
if (!caps.mixedSamplesSupport() && InternalMultisample::kYes == internalMultisample) {
56+
sampleCount = caps.internalMultisampleCount(format);
57+
}
5558

5659
auto instantiate = [cb = std::move(callback), format, sampleCount](GrResourceProvider* rp) {
5760
return cb(rp, format, sampleCount);

0 commit comments

Comments
 (0)