Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: skia/ext/vector_platform_device_skia.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.cc ('k') | skia/ext/vector_platform_device_skia.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_
6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/logging.h"
11 #include "skia/ext/platform_device.h"
12 #include "skia/ext/refptr.h"
13 #include "third_party/skia/include/pdf/SkPDFDevice.h"
14
15 class SkMatrix;
16
17 namespace skia {
18
19 class BitmapPlatformDevice;
20
21 class VectorPlatformDeviceSkia : public SkPDFDevice, public PlatformDevice {
22 public:
23 SK_API VectorPlatformDeviceSkia(const SkISize& pageSize,
24 const SkISize& contentSize,
25 const SkMatrix& initialTransform);
26 ~VectorPlatformDeviceSkia() override;
27
28 // PlatformDevice methods.
29 bool SupportsPlatformPaint() override;
30
31 PlatformSurface BeginPlatformPaint() override;
32 void EndPlatformPaint() override;
33 #if defined(OS_WIN)
34 virtual void DrawToNativeContext(HDC dc,
35 int x,
36 int y,
37 const RECT* src_rect) override;
38 #elif defined(OS_MACOSX)
39 void DrawToNativeContext(CGContext* context,
40 int x,
41 int y,
42 const CGRect* src_rect) override;
43 CGContextRef GetBitmapContext() override;
44 #elif defined(OS_POSIX)
45 virtual void DrawToNativeContext(PlatformSurface surface,
46 int x,
47 int y,
48 const PlatformRect* src_rect) override;
49 #endif
50
51 private:
52 skia::RefPtr<BitmapPlatformDevice> raster_surface_;
53
54 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceSkia);
55 };
56
57 } // namespace skia
58
59 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_SKIA_H_
OLDNEW
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.cc ('k') | skia/ext/vector_platform_device_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698