Chromium Code Reviews| Index: src/gpu/GrDrawTarget.cpp |
| diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
| index 6d8d18463aec37f28bc34c18d7ea59b578462f04..7354ae12eb93c73b71f325f53fd50533570d5a01 100644 |
| --- a/src/gpu/GrDrawTarget.cpp |
| +++ b/src/gpu/GrDrawTarget.cpp |
| @@ -1029,6 +1029,7 @@ void GrDrawTargetCaps::reset() { |
| fMaxSampleCount = 0; |
| memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); |
| + memset(fCompressedFormatSupport, 0, sizeof(fCompressedFormatSupport)); |
| } |
| GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { |
| @@ -1054,6 +1055,8 @@ GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { |
| fMaxSampleCount = other.fMaxSampleCount; |
| memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRenderSupport)); |
| + memcpy(fCompressedFormatSupport, other.fCompressedFormatSupport, |
| + sizeof(fCompressedFormatSupport)); |
| return *this; |
| } |
| @@ -1129,5 +1132,18 @@ SkString GrDrawTargetCaps::dump() const { |
| gNY[fConfigRenderSupport[i][1]]); |
| } |
| } |
| + |
|
robertphillips
2014/05/27 12:20:35
add new enums here !?
krajcevski
2014/05/27 14:32:01
Done.
|
| + static const char* kCompressedFormatNames[] = { |
| + "ETC1", // kETC1_GrCompressedFormat |
| + }; |
| + GR_STATIC_ASSERT(0 == kETC1_GrCompressedFormat); |
| + GR_STATIC_ASSERT(SK_ARRAY_COUNT(kCompressedFormatNames) == kGrCompressedFormatCount); |
| + |
| + for (size_t i = 0; i < SK_ARRAY_COUNT(kCompressedFormatNames); ++i) { |
| + r.appendf("%s Compressed Texture Support: %s\n", |
| + kCompressedFormatNames[i], |
| + gNY[fCompressedFormatSupport[i]]); |
| + } |
| + |
| return r; |
| } |