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

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

Issue 6914029: We assume that each SkDevice is our custom PlatformDevice. This assumption is not valid when usin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « no previous file | skia/ext/platform_canvas.cc » ('j') | skia/ext/platform_canvas.cc » ('J')
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 #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.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // alignment reasons we may wish to increase that. 92 // alignment reasons we may wish to increase that.
93 static size_t StrideForWidth(unsigned width); 93 static size_t StrideForWidth(unsigned width);
94 94
95 // Allow callers to see the non-virtual function even though we have an 95 // Allow callers to see the non-virtual function even though we have an
96 // override of a virtual one. 96 // override of a virtual one.
97 // FIXME(brettw) is this necessary? 97 // FIXME(brettw) is this necessary?
98 using SkCanvas::clipRect; 98 using SkCanvas::clipRect;
99 99
100 private: 100 private:
101 // Helper method used internally by the initialize() methods. 101 // Helper method used internally by the initialize() methods.
102 bool initializeWithDevice(SkDevice* device); 102 bool initializeWithDevice(PlatformDevice* device);
103 103
104 // Unimplemented. This is to try to prevent people from calling this function 104 // Unimplemented. This is to try to prevent people from calling this function
105 // on SkCanvas. SkCanvas' version is not virtual, so we can't prevent this 105 // on SkCanvas. SkCanvas' version is not virtual, so we can't prevent this
106 // 100%, but hopefully this will make people notice and not use the function. 106 // 100%, but hopefully this will make people notice and not use the function.
107 // Calling SkCanvas' version will create a new device which is not compatible 107 // Calling SkCanvas' version will create a new device which is not compatible
108 // with us and we will crash if somebody tries to draw into it with 108 // with us and we will crash if somebody tries to draw into it with
109 // CoreGraphics. 109 // CoreGraphics.
110 virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap); 110 virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap);
111 111
112 // Disallow copy and assign. 112 // Disallow copy and assign.
(...skipping 19 matching lines...) Expand all
132 // synchronize the bitmap to OS if necessary. 132 // synchronize the bitmap to OS if necessary.
133 // 133 //
134 // Note: These functions will eventually replace 134 // Note: These functions will eventually replace
135 // PlatformCanvas::beginPlatformPaint and PlatformCanvas::endPlatformPaint. 135 // PlatformCanvas::beginPlatformPaint and PlatformCanvas::endPlatformPaint.
136 SK_API PlatformDevice::PlatformSurface BeginPlatformPaint(SkCanvas* canvas); 136 SK_API PlatformDevice::PlatformSurface BeginPlatformPaint(SkCanvas* canvas);
137 SK_API void EndPlatformPaint(SkCanvas* canvas); 137 SK_API void EndPlatformPaint(SkCanvas* canvas);
138 138
139 } // namespace skia 139 } // namespace skia
140 140
141 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ 141 #endif // SKIA_EXT_PLATFORM_CANVAS_H_
OLDNEW
« no previous file with comments | « no previous file | skia/ext/platform_canvas.cc » ('j') | skia/ext/platform_canvas.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698