| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_GFX_IMAGE_IMAGE_SKIA_REP_H_ | 5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_REP_H_ |
| 6 #define UI_GFX_IMAGE_IMAGE_SKIA_REP_H_ | 6 #define UI_GFX_IMAGE_IMAGE_SKIA_REP_H_ |
| 7 | 7 |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 #include "ui/base/layout.h" | 9 #include "ui/base/layout.h" |
| 10 #include "ui/base/ui_export.h" | 10 #include "ui/base/ui_export.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 int pixel_height() const { return bitmap_.height(); } | 39 int pixel_height() const { return bitmap_.height(); } |
| 40 | 40 |
| 41 // Retrieves the scale that the bitmap will be painted at. | 41 // Retrieves the scale that the bitmap will be painted at. |
| 42 float GetScale() const; | 42 float GetScale() const; |
| 43 ui::ScaleFactor scale_factor() const { return scale_factor_; } | 43 ui::ScaleFactor scale_factor() const { return scale_factor_; } |
| 44 | 44 |
| 45 // Returns backing bitmap. | 45 // Returns backing bitmap. |
| 46 const SkBitmap& sk_bitmap() const { return bitmap_; } | 46 const SkBitmap& sk_bitmap() const { return bitmap_; } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 friend class ImageSkia; |
| 50 SkBitmap& mutable_sk_bitmap() { return bitmap_; } |
| 51 |
| 49 SkBitmap bitmap_; | 52 SkBitmap bitmap_; |
| 50 ui::ScaleFactor scale_factor_; | 53 ui::ScaleFactor scale_factor_; |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 } // namespace gfx | 56 } // namespace gfx |
| 54 | 57 |
| 55 #endif // UI_GFX_IMAGE_IMAGE_SKIA_REP_H_ | 58 #endif // UI_GFX_IMAGE_IMAGE_SKIA_REP_H_ |
| OLD | NEW |