| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 kStencil_GrGLBackendState = 1 << 6, | 634 kStencil_GrGLBackendState = 1 << 6, |
| 635 kPixelStore_GrGLBackendState = 1 << 7, | 635 kPixelStore_GrGLBackendState = 1 << 7, |
| 636 kProgram_GrGLBackendState = 1 << 8, | 636 kProgram_GrGLBackendState = 1 << 8, |
| 637 kFixedFunction_GrGLBackendState = 1 << 9, | 637 kFixedFunction_GrGLBackendState = 1 << 9, |
| 638 kMisc_GrGLBackendState = 1 << 10, | 638 kMisc_GrGLBackendState = 1 << 10, |
| 639 kPathRendering_GrGLBackendState = 1 << 11, | 639 kPathRendering_GrGLBackendState = 1 << 11, |
| 640 kALL_GrGLBackendState = 0xffff | 640 kALL_GrGLBackendState = 0xffff |
| 641 }; | 641 }; |
| 642 | 642 |
| 643 /** | 643 /** |
| 644 * Returns the data size for the given compressed pixel config | |
| 645 */ | |
| 646 static inline size_t GrCompressedFormatDataSize(GrPixelConfig config, | |
| 647 int width, int height) { | |
| 648 SkASSERT(GrPixelConfigIsCompressed(config)); | |
| 649 | |
| 650 switch (config) { | |
| 651 case kLATC_GrPixelConfig: | |
| 652 case kETC1_GrPixelConfig: | |
| 653 SkASSERT((width & 3) == 0); | |
| 654 SkASSERT((height & 3) == 0); | |
| 655 return (width >> 2) * (height >> 2) * 8; | |
| 656 | |
| 657 default: | |
| 658 SkFAIL("Unknown compressed pixel config"); | |
| 659 return 4 * width * height; | |
| 660 } | |
| 661 } | |
| 662 | |
| 663 /** | |
| 664 * This value translates to reseting all the context state for any backend. | 644 * This value translates to reseting all the context state for any backend. |
| 665 */ | 645 */ |
| 666 static const uint32_t kAll_GrBackendState = 0xffffffff; | 646 static const uint32_t kAll_GrBackendState = 0xffffffff; |
| 667 | 647 |
| 668 /////////////////////////////////////////////////////////////////////////////// | 648 /////////////////////////////////////////////////////////////////////////////// |
| 669 | 649 |
| 670 #endif | 650 #endif |
| OLD | NEW |