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

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

Issue 2610323004: Remove skia::DrawToNativeContext() (Closed)
Patch Set: missing header Created 3 years, 11 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
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #if defined(WIN32) 45 #if defined(WIN32)
46 // The shared_section parameter is passed to gfx::PlatformDevice::create. 46 // The shared_section parameter is passed to gfx::PlatformDevice::create.
47 // See it for details. 47 // See it for details.
48 SK_API std::unique_ptr<SkCanvas> CreatePlatformCanvasWithSharedSection( 48 SK_API std::unique_ptr<SkCanvas> CreatePlatformCanvasWithSharedSection(
49 int width, 49 int width,
50 int height, 50 int height,
51 bool is_opaque, 51 bool is_opaque,
52 HANDLE shared_section, 52 HANDLE shared_section,
53 OnFailureType failure_type); 53 OnFailureType failure_type);
54 54
55 // Draws the top layer of the canvas into the specified HDC. Only works
56 // with a SkCanvas with a BitmapPlatformDevice. Will create a temporary
57 // HDC to back the canvas if one doesn't already exist, tearing it down
58 // before returning. If |src_rect| is null, copies the entire canvas.
59 SK_API void DrawToNativeContext(SkCanvas* canvas,
60 HDC hdc,
61 int x,
62 int y,
63 const RECT* src_rect);
64
65 // Returns the NativeDrawingContext to use for native platform drawing calls. 55 // Returns the NativeDrawingContext to use for native platform drawing calls.
66 SK_API HDC GetNativeDrawingContext(SkCanvas* canvas); 56 SK_API HDC GetNativeDrawingContext(SkCanvas* canvas);
67 57
68 #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ 58 #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
69 defined(__sun) || defined(ANDROID) || defined(__APPLE__) 59 defined(__sun) || defined(ANDROID) || defined(__APPLE__)
70 // Construct a canvas from the given memory region. The memory is not cleared 60 // Construct a canvas from the given memory region. The memory is not cleared
71 // first. @data must be, at least, @height * StrideForWidth(@width) bytes. 61 // first. @data must be, at least, @height * StrideForWidth(@width) bytes.
72 SK_API std::unique_ptr<SkCanvas> CreatePlatformCanvasWithPixels( 62 SK_API std::unique_ptr<SkCanvas> CreatePlatformCanvasWithPixels(
73 int width, 63 int width,
74 int height, 64 int height,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 SK_API SkMetaData& GetMetaData(const SkCanvas& canvas); 120 SK_API SkMetaData& GetMetaData(const SkCanvas& canvas);
131 121
132 #if defined(OS_MACOSX) 122 #if defined(OS_MACOSX)
133 SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview); 123 SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview);
134 SK_API bool IsPreviewMetafile(const SkCanvas& canvas); 124 SK_API bool IsPreviewMetafile(const SkCanvas& canvas);
135 #endif 125 #endif
136 126
137 } // namespace skia 127 } // namespace skia
138 128
139 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ 129 #endif // SKIA_EXT_PLATFORM_CANVAS_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698