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

Side by Side Diff: include/gpu/GrTypes.h

Issue 302783002: Initial work to get ETC1 data up to the GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add #define to not always compile in ETC1 support Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 /**
644 * This value translates to reseting all the context state for any backend. 664 * This value translates to reseting all the context state for any backend.
645 */ 665 */
646 static const uint32_t kAll_GrBackendState = 0xffffffff; 666 static const uint32_t kAll_GrBackendState = 0xffffffff;
647 667
648 /////////////////////////////////////////////////////////////////////////////// 668 ///////////////////////////////////////////////////////////////////////////////
649 669
650 #endif 670 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698