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

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

Issue 7273013: Stop using deprecated factory API for SkDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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_PLATFORM_CANVAS_H_ 5 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_
6 #define SKIA_EXT_PLATFORM_CANVAS_H_ 6 #define SKIA_EXT_PLATFORM_CANVAS_H_
7 #pragma once 7 #pragma once
8 8
9 // The platform-specific device will include the necessary platform headers 9 // The platform-specific device will include the necessary platform headers
10 // to get the surface type. 10 // to get the surface type.
11 #include "skia/ext/platform_device.h" 11 #include "skia/ext/platform_device.h"
12 #include "third_party/skia/include/core/SkCanvas.h" 12 #include "third_party/skia/include/core/SkCanvas.h"
13 13
14 namespace skia { 14 namespace skia {
15 15
16 // This class is a specialization of the regular SkCanvas that is designed to 16 // This class is a specialization of the regular SkCanvas that is designed to
17 // work with a PlatformDevice to manage platform-specific drawing. It allows 17 // work with a PlatformDevice to manage platform-specific drawing. It allows
18 // using both Skia operations and platform-specific operations. 18 // using both Skia operations and platform-specific operations.
19 class SK_API PlatformCanvas : public SkCanvas { 19 class SK_API PlatformCanvas : public SkCanvas {
20 public: 20 public:
21 // If you use the version with no arguments, you MUST call initialize() 21 // If you use the version with no arguments, you MUST call initialize()
22 PlatformCanvas(); 22 PlatformCanvas();
23 explicit PlatformCanvas(SkDeviceFactory* factory);
24 // Set is_opaque if you are going to erase the bitmap and not use 23 // Set is_opaque if you are going to erase the bitmap and not use
25 // transparency: this will enable some optimizations. 24 // transparency: this will enable some optimizations.
26 PlatformCanvas(int width, int height, bool is_opaque); 25 PlatformCanvas(int width, int height, bool is_opaque);
27 26
28 #if defined(WIN32) 27 #if defined(WIN32)
29 // The shared_section parameter is passed to gfx::PlatformDevice::create. 28 // The shared_section parameter is passed to gfx::PlatformDevice::create.
30 // See it for details. 29 // See it for details.
31 PlatformCanvas(int width, int height, bool is_opaque, HANDLE shared_section); 30 PlatformCanvas(int width, int height, bool is_opaque, HANDLE shared_section);
32 #elif defined(__APPLE__) 31 #elif defined(__APPLE__)
33 PlatformCanvas(int width, int height, bool is_opaque, 32 PlatformCanvas(int width, int height, bool is_opaque,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 PlatformSurface platform_surface_; 149 PlatformSurface platform_surface_;
151 150
152 // Disallow copy and assign 151 // Disallow copy and assign
153 ScopedPlatformPaint(const ScopedPlatformPaint&); 152 ScopedPlatformPaint(const ScopedPlatformPaint&);
154 ScopedPlatformPaint& operator=(const ScopedPlatformPaint&); 153 ScopedPlatformPaint& operator=(const ScopedPlatformPaint&);
155 }; 154 };
156 155
157 } // namespace skia 156 } // namespace skia
158 157
159 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ 158 #endif // SKIA_EXT_PLATFORM_CANVAS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698