OLD | NEW |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #endif | 62 #endif |
63 | 63 |
64 // Shared -------------------------------------------------------------------- | 64 // Shared -------------------------------------------------------------------- |
65 | 65 |
66 // These calls should surround calls to platform drawing routines, the | 66 // These calls should surround calls to platform drawing routines, the |
67 // surface returned here can be used with the native platform routines | 67 // surface returned here can be used with the native platform routines |
68 // | 68 // |
69 // Call endPlatformPaint when you are done and want to use Skia operations | 69 // Call endPlatformPaint when you are done and want to use Skia operations |
70 // after calling the platform-specific beginPlatformPaint; this will | 70 // after calling the platform-specific beginPlatformPaint; this will |
71 // synchronize the bitmap to OS if necessary. | 71 // synchronize the bitmap to OS if necessary. |
72 PlatformDevice::PlatformSurface beginPlatformPaint(); | 72 PlatformDevice::PlatformSurface beginPlatformPaint() const; |
73 void endPlatformPaint(); | 73 void endPlatformPaint() const; |
74 | 74 |
75 // Returns the platform device pointer of the topmost rect with a non-empty | 75 // Returns the platform device pointer of the topmost rect with a non-empty |
76 // clip. In practice, this is usually either the top layer or nothing, since | 76 // clip. In practice, this is usually either the top layer or nothing, since |
77 // we usually set the clip to new layers when we make them. | 77 // we usually set the clip to new layers when we make them. |
78 // | 78 // |
79 // If there is no layer that is not all clipped out, this will return a | 79 // If there is no layer that is not all clipped out, this will return a |
80 // dummy device so callers do not have to check. If you are concerned about | 80 // dummy device so callers do not have to check. If you are concerned about |
81 // performance, check the clip before doing any painting. | 81 // performance, check the clip before doing any painting. |
82 // | 82 // |
83 // This is different than SkCanvas' getDevice, because that returns the | 83 // This is different than SkCanvas' getDevice, because that returns the |
(...skipping 26 matching lines...) Expand all Loading... |
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. |
113 PlatformCanvas(const PlatformCanvas&); | 113 PlatformCanvas(const PlatformCanvas&); |
114 PlatformCanvas& operator=(const PlatformCanvas&); | 114 PlatformCanvas& operator=(const PlatformCanvas&); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace skia | 117 } // namespace skia |
118 | 118 |
119 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ | 119 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ |
OLD | NEW |