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

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: Fix GCC warning 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
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 // Unknown pixel config...
robertphillips 2014/05/30 15:00:22 SkFAIL here?
krajcevski 2014/05/30 16:21:50 Done.
659 SkASSERT(false);
660 return 4 * width * height;
661 }
662 }
663
664 /**
644 * This value translates to reseting all the context state for any backend. 665 * This value translates to reseting all the context state for any backend.
645 */ 666 */
646 static const uint32_t kAll_GrBackendState = 0xffffffff; 667 static const uint32_t kAll_GrBackendState = 0xffffffff;
647 668
648 /////////////////////////////////////////////////////////////////////////////// 669 ///////////////////////////////////////////////////////////////////////////////
649 670
650 #endif 671 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrContext.cpp » ('j') | src/gpu/GrGpu.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698