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

Side by Side Diff: src/utils/SkTextureCompressor.h

Issue 422023006: Add query for block dimensions of a given format (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Bracketing ifdefs Created 6 years, 4 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 | « src/opts/SkTextureCompression_opts_none.cpp ('k') | src/utils/SkTextureCompressor.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTextureCompressor_DEFINED 8 #ifndef SkTextureCompressor_DEFINED
9 #define SkTextureCompressor_DEFINED 9 #define SkTextureCompressor_DEFINED
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // are. The typedef is not meant to be used by clients of the API, but rathe r 48 // are. The typedef is not meant to be used by clients of the API, but rathe r
49 // allows SIMD optimized compression functions to be implemented. 49 // allows SIMD optimized compression functions to be implemented.
50 typedef bool (*CompressionProc)(uint8_t* dst, const uint8_t* src, 50 typedef bool (*CompressionProc)(uint8_t* dst, const uint8_t* src,
51 int width, int height, int rowBytes); 51 int width, int height, int rowBytes);
52 52
53 // Returns the blitter for the given compression format. Note, the blitter 53 // Returns the blitter for the given compression format. Note, the blitter
54 // is intended to be used with the proper input. I.e. if you try to blit 54 // is intended to be used with the proper input. I.e. if you try to blit
55 // RGB source data into an R11 EAC texture, you're gonna have a bad time. 55 // RGB source data into an R11 EAC texture, you're gonna have a bad time.
56 SkBlitter* CreateBlitterForFormat(int width, int height, void* compressedBuf fer, 56 SkBlitter* CreateBlitterForFormat(int width, int height, void* compressedBuf fer,
57 Format format); 57 Format format);
58
59 // Returns the desired dimensions of the block size for the given format. Th ese dimensions
60 // don't necessarily correspond to the hardware-specified dimensions, since there may
61 // be specialized algorithms that operate on multiple blocks at once. These dimensions
62 // reflect that optimization and return the appropriate operable dimensions.
63 void GetBlockDimensions(Format format, int* dimX, int* dimY);
58 } 64 }
59 65
60 #endif 66 #endif
OLDNEW
« no previous file with comments | « src/opts/SkTextureCompression_opts_none.cpp ('k') | src/utils/SkTextureCompressor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698