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

Side by Side Diff: src/utils/SkPictureUtils.cpp

Issue 148883011: Make SkImageFilter methods const. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More fixes to gm/ Created 6 years, 10 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 | « src/utils/SkGatherPixelRefsAndRects.h ('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 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } 68 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; }
69 virtual bool filterTextFlags(const SkPaint& paint, TextFlags*) SK_OVERRIDE { 69 virtual bool filterTextFlags(const SkPaint& paint, TextFlags*) SK_OVERRIDE {
70 return false; 70 return false;
71 } 71 }
72 // TODO: allow this call to return failure, or move to SkBitmapDevice only. 72 // TODO: allow this call to return failure, or move to SkBitmapDevice only.
73 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE { 73 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE {
74 return fEmptyBitmap; 74 return fEmptyBitmap;
75 } 75 }
76 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); } 76 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); }
77 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); } 77 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); }
78 virtual bool allowImageFilter(SkImageFilter*) SK_OVERRIDE { return false; } 78 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal se; }
79 virtual bool canHandleImageFilter(SkImageFilter*) SK_OVERRIDE { return false ; } 79 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return false; }
80 virtual bool filterImage(SkImageFilter*, const SkBitmap&, const SkMatrix&, 80 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr ix&,
81 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { 81 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE {
82 return false; 82 return false;
83 } 83 }
84 84
85 virtual void clear(SkColor color) SK_OVERRIDE { 85 virtual void clear(SkColor color) SK_OVERRIDE {
86 nothing_to_do(); 86 nothing_to_do();
87 } 87 }
88 virtual void writePixels(const SkBitmap& bitmap, int x, int y, 88 virtual void writePixels(const SkBitmap& bitmap, int x, int y,
89 SkCanvas::Config8888 config8888) SK_OVERRIDE { 89 SkCanvas::Config8888 config8888) SK_OVERRIDE {
90 not_supported(); 90 not_supported();
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 canvas.clipRect(area, SkRegion::kIntersect_Op, false); 229 canvas.clipRect(area, SkRegion::kIntersect_Op, false);
230 canvas.drawPicture(*pict); 230 canvas.drawPicture(*pict);
231 231
232 SkData* data = NULL; 232 SkData* data = NULL;
233 int count = array.count(); 233 int count = array.count();
234 if (count > 0) { 234 if (count > 0) {
235 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) ); 235 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) );
236 } 236 }
237 return data; 237 return data;
238 } 238 }
OLDNEW
« no previous file with comments | « src/utils/SkGatherPixelRefsAndRects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698