change all interfaces for SkRasterizer to const, in preparation for marking it
as immutable/re-entrant safe. Review URL: https://codereview.appspot.com/6936064 git-svn-id: http://skia.googlecode.com/svn/trunk@6878 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
548a1f3210
commit
fdba4041c3
@ -28,14 +28,14 @@ public:
|
||||
*/
|
||||
bool rasterize(const SkPath& path, const SkMatrix& matrix,
|
||||
const SkIRect* clipBounds, SkMaskFilter* filter,
|
||||
SkMask* mask, SkMask::CreateMode mode);
|
||||
SkMask* mask, SkMask::CreateMode mode) const;
|
||||
|
||||
protected:
|
||||
SkRasterizer(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
|
||||
|
||||
virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix,
|
||||
const SkIRect* clipBounds,
|
||||
SkMask* mask, SkMask::CreateMode mode);
|
||||
SkMask* mask, SkMask::CreateMode mode) const;
|
||||
|
||||
private:
|
||||
typedef SkFlattenable INHERITED;
|
||||
|
@ -41,7 +41,7 @@ protected:
|
||||
// override from SkRasterizer
|
||||
virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix,
|
||||
const SkIRect* clipBounds,
|
||||
SkMask* mask, SkMask::CreateMode mode);
|
||||
SkMask* mask, SkMask::CreateMode mode) const;
|
||||
|
||||
private:
|
||||
SkDeque fLayers;
|
||||
|
@ -16,7 +16,7 @@ SK_DEFINE_INST_COUNT(SkRasterizer)
|
||||
|
||||
bool SkRasterizer::rasterize(const SkPath& fillPath, const SkMatrix& matrix,
|
||||
const SkIRect* clipBounds, SkMaskFilter* filter,
|
||||
SkMask* mask, SkMask::CreateMode mode) {
|
||||
SkMask* mask, SkMask::CreateMode mode) const {
|
||||
SkIRect storage;
|
||||
|
||||
if (clipBounds && filter && SkMask::kJustRenderImage_CreateMode != mode) {
|
||||
@ -41,7 +41,7 @@ bool SkRasterizer::rasterize(const SkPath& fillPath, const SkMatrix& matrix,
|
||||
*/
|
||||
bool SkRasterizer::onRasterize(const SkPath& fillPath, const SkMatrix& matrix,
|
||||
const SkIRect* clipBounds,
|
||||
SkMask* mask, SkMask::CreateMode mode) {
|
||||
SkMask* mask, SkMask::CreateMode mode) const {
|
||||
SkPath devPath;
|
||||
|
||||
fillPath.transform(matrix, &devPath);
|
||||
|
@ -87,7 +87,7 @@ static bool compute_bounds(const SkDeque& layers, const SkPath& path,
|
||||
|
||||
bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix,
|
||||
const SkIRect* clipBounds,
|
||||
SkMask* mask, SkMask::CreateMode mode) {
|
||||
SkMask* mask, SkMask::CreateMode mode) const {
|
||||
if (fLayers.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user