| 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 c31c63aa649a5a04b933ff92bc6e0f9ee11b0607..70b55a87b1689716a1fa5ab1434f1d4262939179 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 IsNativeFontRenderingAllowed() OVERRIDE;
|
| -
|
| + virtual bool IsNativeRenderingAllowed() 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:
|
| - 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_
|
|
|