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

Side by Side Diff: src/android/SkBitmapRegionDecoderPriv.h

Issue 1443033002: Remove dependency on src/android from dm and nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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
« bench/BitmapRegionDecoderBench.cpp ('K') | « gyp/visualbench.gyp ('k') | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 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 SkBitmapRegionDecoderPriv_DEFINED 8 #ifndef SkBitmapRegionDecoderPriv_DEFINED
9 #define SkBitmapRegionDecoderPriv_DEFINED 9 #define SkBitmapRegionDecoderPriv_DEFINED
10 10
11 inline float get_scale_from_sample_size(uint32_t sampleSize) {
12 return 1.0f / (float) sampleSize;
13 }
14
15 enum SubsetType { 11 enum SubsetType {
16 kFullyInside_SubsetType, 12 kFullyInside_SubsetType,
17 kPartiallyInside_SubsetType, 13 kPartiallyInside_SubsetType,
18 kOutside_SubsetType, 14 kOutside_SubsetType,
19 }; 15 };
20 16
21 /* 17 /*
22 * Corrects image subset offsets and dimensions in order to perform a valid deco de. 18 * Corrects image subset offsets and dimensions in order to perform a valid deco de.
23 * Also indicates if the image subset should be placed at an offset within the 19 * Also indicates if the image subset should be placed at an offset within the
24 * output bitmap. 20 * output bitmap.
(...skipping 29 matching lines...) Expand all
54 subset->setXYWH(left, top, width, height); 50 subset->setXYWH(left, top, width, height);
55 if ((*outX != 0) || (*outY != 0) || (width != subset->width()) || 51 if ((*outX != 0) || (*outY != 0) || (width != subset->width()) ||
56 (height != subset->height())) { 52 (height != subset->height())) {
57 return SubsetType::kPartiallyInside_SubsetType; 53 return SubsetType::kPartiallyInside_SubsetType;
58 } 54 }
59 55
60 return SubsetType::kFullyInside_SubsetType; 56 return SubsetType::kFullyInside_SubsetType;
61 } 57 }
62 58
63 #endif // SkBitmapRegionDecoderPriv_DEFINED 59 #endif // SkBitmapRegionDecoderPriv_DEFINED
OLDNEW
« bench/BitmapRegionDecoderBench.cpp ('K') | « gyp/visualbench.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698