| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BITMAP_PLATFORM_DEVICE_SKIA_H_ | 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_SKIA_H_ |
| 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_SKIA_H_ | 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_SKIA_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "skia/ext/platform_device.h" | 10 #include "skia/ext/platform_device.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 uint8_t* data); | 31 uint8_t* data); |
| 32 | 32 |
| 33 // Create a BitmapPlatformDevice from an already constructed bitmap; | 33 // Create a BitmapPlatformDevice from an already constructed bitmap; |
| 34 // you should probably be using Create(). This may become private later if | 34 // you should probably be using Create(). This may become private later if |
| 35 // we ever have to share state between some native drawing UI and Skia, like | 35 // we ever have to share state between some native drawing UI and Skia, like |
| 36 // the Windows and Mac versions of this class do. | 36 // the Windows and Mac versions of this class do. |
| 37 explicit BitmapPlatformDevice(const SkBitmap& other); | 37 explicit BitmapPlatformDevice(const SkBitmap& other); |
| 38 virtual ~BitmapPlatformDevice(); | 38 virtual ~BitmapPlatformDevice(); |
| 39 | 39 |
| 40 virtual PlatformSurface BeginPlatformPaint() override; | 40 virtual PlatformSurface BeginPlatformPaint() override; |
| 41 virtual void DrawToNativeContext(PlatformSurface surface, int x, int y, | |
| 42 const PlatformRect* src_rect) override; | |
| 43 | 41 |
| 44 protected: | 42 protected: |
| 45 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) | 43 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) |
| 46 override; | 44 override; |
| 47 | 45 |
| 48 private: | 46 private: |
| 49 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); | 47 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 } // namespace skia | 50 } // namespace skia |
| 53 | 51 |
| 54 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_SKIA_H_ | 52 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_SKIA_H_ |
| OLD | NEW |