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

Side by Side Diff: src/opts/SkTextureCompression_opts_arm.cpp

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.h ('k') | src/opts/SkTextureCompression_opts_none.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 #include "SkTextureCompression_opts.h" 8 #include "SkTextureCompression_opts.h"
9 #include "SkTextureCompression_opts_neon.h" 9 #include "SkTextureCompression_opts_neon.h"
10 #include "SkUtilsArm.h" 10 #include "SkUtilsArm.h"
(...skipping 18 matching lines...) Expand all
29 return NULL; 29 return NULL;
30 } 30 }
31 } 31 }
32 break; 32 break;
33 33
34 default: 34 default:
35 return NULL; 35 return NULL;
36 } 36 }
37 #endif 37 #endif
38 } 38 }
39
40 bool SkTextureCompressorGetPlatformDims(SkTextureCompressor::Format fmt, int* di mX, int* dimY) {
41 #if SK_ARM_NEON_IS_NONE
42 return false;
43 #else
44 #if SK_ARM_NEON_IS_DYNAMIC
45 if (!sk_cpu_arm_has_neon()) {
46 return false;
47 }
48 #endif
49 switch (fmt) {
50 case SkTextureCompressor::kR11_EAC_Format:
51 *dimX = 16;
52 *dimY = 4;
53 return true;
54 default:
55 return false;
56 }
57 return false;
58 #endif
59 }
OLDNEW
« no previous file with comments | « src/opts/SkTextureCompression_opts.h ('k') | src/opts/SkTextureCompression_opts_none.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698