Chromium Code Reviews| Index: skia/ext/recording_platform_device_skia.h |
| diff --git a/skia/ext/vector_platform_device_skia.h b/skia/ext/recording_platform_device_skia.h |
| similarity index 61% |
| copy from skia/ext/vector_platform_device_skia.h |
| copy to skia/ext/recording_platform_device_skia.h |
| index 0575563f9862c3b2304d629c1420f1f9cf9adabb..0a12f0829ae57d5344884c14c23c180b4d6e326e 100644 |
| --- a/skia/ext/vector_platform_device_skia.h |
| +++ b/skia/ext/recording_platform_device_skia.h |
| @@ -1,34 +1,31 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ |
| -#define SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ |
| +#ifndef SKIA_EXT_RECORDING_PLATFORM_DEVICE_SKIA_H_ |
| +#define SKIA_EXT_RECORDING_PLATFORM_DEVICE_SKIA_H_ |
| #include "base/basictypes.h" |
| #include "base/compiler_specific.h" |
| -#include "base/logging.h" |
| #include "skia/ext/platform_device.h" |
| #include "third_party/skia/include/core/SkRefCnt.h" |
| -#include "third_party/skia/include/core/SkTScopedPtr.h" |
| -#include "third_party/skia/include/pdf/SkPDFDevice.h" |
| -class SkMatrix; |
| +class SkPicture; |
| namespace skia { |
| class BitmapPlatformDevice; |
| -class VectorPlatformDeviceSkia : public SkPDFDevice, public PlatformDevice { |
| +class RecordingPlatformDeviceSkia : public SkDevice, |
| + public PlatformDevice { |
| public: |
| - SK_API VectorPlatformDeviceSkia(const SkISize& pageSize, |
| - const SkISize& contentSize, |
| - const SkMatrix& initialTransform); |
| - virtual ~VectorPlatformDeviceSkia(); |
| + RecordingPlatformDeviceSkia( |
| + const SkBitmap& bitmap, SkPicture* picture); |
| + virtual ~RecordingPlatformDeviceSkia(); |
| - // PlatformDevice methods. |
| + // Overridden from PlatformDevice: |
| virtual bool SupportsPlatformPaint() OVERRIDE; |
| - |
| + virtual bool SupportsDirectPlatformPaint() OVERRIDE; |
| virtual PlatformSurface BeginPlatformPaint() OVERRIDE; |
| virtual void EndPlatformPaint() OVERRIDE; |
| #if defined(OS_WIN) |
| @@ -50,11 +47,16 @@ class VectorPlatformDeviceSkia : public SkPDFDevice, public PlatformDevice { |
| #endif |
| private: |
|
reed1
2012/09/20 13:42:28
No SkRefPtr please.
reveman
2012/09/20 17:01:26
will fix.
|
| - SkRefPtr<BitmapPlatformDevice> raster_surface_; |
| + SkRefPtr<SkCanvas> raster_canvas_; |
| + SkMatrix raster_matrix_; |
| + SkPicture* picture_; |
| - DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceSkia); |
| + DISALLOW_COPY_AND_ASSIGN(RecordingPlatformDeviceSkia); |
| }; |
| +SK_API SkDevice* CreateRecordingPlatformDeviceSkia( |
| + SkPicture* picture, int width, int height); |
| + |
| } // namespace skia |
| -#endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_ |
| +#endif // SKIA_EXT_RECORDING_PLATFORM_DEVICE_SKIA_H_ |