| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SKIA_EXT_IMAGE_OPERATIONS_H_ | 5 #ifndef SKIA_EXT_IMAGE_OPERATIONS_H_ |
| 6 #define SKIA_EXT_IMAGE_OPERATIONS_H_ | 6 #define SKIA_EXT_IMAGE_OPERATIONS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "third_party/skia/include/core/SkTypes.h" |
| 10 |
| 9 class SkBitmap; | 11 class SkBitmap; |
| 10 struct SkIRect; | 12 struct SkIRect; |
| 11 | 13 |
| 12 namespace skia { | 14 namespace skia { |
| 13 | 15 |
| 14 class ImageOperations { | 16 class SK_API ImageOperations { |
| 15 public: | 17 public: |
| 16 enum ResizeMethod { | 18 enum ResizeMethod { |
| 17 // | 19 // |
| 18 // Quality Methods | 20 // Quality Methods |
| 19 // | 21 // |
| 20 // Those enumeration values express a desired quality/speed tradeoff. | 22 // Those enumeration values express a desired quality/speed tradeoff. |
| 21 // They are translated into an algorithm-specific method that depends | 23 // They are translated into an algorithm-specific method that depends |
| 22 // on the capabilities (CPU, GPU) of the underlying platform. | 24 // on the capabilities (CPU, GPU) of the underlying platform. |
| 23 // It is possible for all three methods to be mapped to the same | 25 // It is possible for all three methods to be mapped to the same |
| 24 // algorithm on a given platform. | 26 // algorithm on a given platform. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 121 |
| 120 // Subpixel renderer. | 122 // Subpixel renderer. |
| 121 static SkBitmap ResizeSubpixel(const SkBitmap& source, | 123 static SkBitmap ResizeSubpixel(const SkBitmap& source, |
| 122 int dest_width, int dest_height, | 124 int dest_width, int dest_height, |
| 123 const SkIRect& dest_subset); | 125 const SkIRect& dest_subset); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace skia | 128 } // namespace skia |
| 127 | 129 |
| 128 #endif // SKIA_EXT_IMAGE_OPERATIONS_H_ | 130 #endif // SKIA_EXT_IMAGE_OPERATIONS_H_ |
| OLD | NEW |