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

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

Issue 9416017: Optionally clear PlatformCanvas instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address style issues. Created 8 years, 10 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ 5 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_
6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "skia/ext/platform_device.h" 11 #include "skia/ext/platform_device.h"
12 #include "third_party/skia/include/core/SkMatrix.h" 12 #include "third_party/skia/include/core/SkMatrix.h"
13 #include "third_party/skia/include/core/SkRegion.h" 13 #include "third_party/skia/include/core/SkRegion.h"
14 14
15 namespace skia { 15 namespace skia {
16 16
17 // A device is basically a wrapper around SkBitmap that provides a surface for 17 // A device is basically a wrapper around SkBitmap that provides a surface for
18 // SkCanvas to draw into. This specific device is not not backed by a surface 18 // SkCanvas to draw into. This specific device is not not backed by a surface
19 // and is thus unreadable. This is because the backend is completely vectorial. 19 // and is thus unreadable. This is because the backend is completely vectorial.
20 // This device is a simple wrapper over a Windows device context (HDC) handle. 20 // This device is a simple wrapper over a Windows device context (HDC) handle.
21 class VectorPlatformDeviceEmf : public PlatformDevice, public SkDevice { 21 class VectorPlatformDeviceEmf : public PlatformDevice, public SkDevice {
22 public: 22 public:
23 SK_API static SkDevice* CreateDevice(int width, int height, bool isOpaque, 23 SK_API static SkDevice* CreateDevice(int width, int height, int flags,
24 HANDLE shared_section); 24 HANDLE shared_section);
25 25
26 // Factory function. The DC is kept as the output context. 26 // Factory function. The DC is kept as the output context.
27 static SkDevice* create(HDC dc, int width, int height); 27 static SkDevice* create(HDC dc, int width, int height);
28 28
29 VectorPlatformDeviceEmf(HDC dc, const SkBitmap& bitmap); 29 VectorPlatformDeviceEmf(HDC dc, const SkBitmap& bitmap);
30 virtual ~VectorPlatformDeviceEmf(); 30 virtual ~VectorPlatformDeviceEmf();
31 31
32 // PlatformDevice methods 32 // PlatformDevice methods
33 virtual PlatformSurface BeginPlatformPaint() OVERRIDE; 33 virtual PlatformSurface BeginPlatformPaint() OVERRIDE;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // True if AlphaBlend() was called during this print. 130 // True if AlphaBlend() was called during this print.
131 bool alpha_blend_used_; 131 bool alpha_blend_used_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceEmf); 133 DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceEmf);
134 }; 134 };
135 135
136 } // namespace skia 136 } // namespace skia
137 137
138 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ 138 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698