| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 #include "SkTypes.h" | 10 #include "SkTypes.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 name.append(num); | 55 name.append(num); |
| 56 if (++fSeqVal > 999) | 56 if (++fSeqVal > 999) |
| 57 sequence = false; | 57 sequence = false; |
| 58 } | 58 } |
| 59 if (type == SkImageEncoder::kJPEG_Type) | 59 if (type == SkImageEncoder::kJPEG_Type) |
| 60 name.append(".jpg"); | 60 name.append(".jpg"); |
| 61 else if (type == SkImageEncoder::kPNG_Type) | 61 else if (type == SkImageEncoder::kPNG_Type) |
| 62 name.append(".png"); | 62 name.append(".png"); |
| 63 encoder->encodeFile(name.c_str(), | 63 encoder->encodeFile(name.c_str(), |
| 64 maker.fCanvas->getDevice()->accessBitmap(false), | 64 maker.fCanvas->getDevice()->accessBitmap(false), |
| 65 SkScalarFloor(quality)); | 65 SkScalarFloorToInt(quality)); |
| 66 return false; | 66 return false; |
| 67 } | 67 } |
| OLD | NEW |