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

Side by Side Diff: src/utils/SkGatherPixelRefsAndRects.h

Issue 199413013: add new readPixels with direct memory parameters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 #ifndef SkGatherPixelRefsAndRects_DEFINED 8 #ifndef SkGatherPixelRefsAndRects_DEFINED
9 #define SkGatherPixelRefsAndRects_DEFINED 9 #define SkGatherPixelRefsAndRects_DEFINED
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 this->drawPoints(draw, SkCanvas::kPolygon_PointMode, vertexCount, verts, paint); 284 this->drawPoints(draw, SkCanvas::kPolygon_PointMode, vertexCount, verts, paint);
285 } 285 }
286 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, 286 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
287 const SkPaint&) SK_OVERRIDE { 287 const SkPaint&) SK_OVERRIDE {
288 NothingToDo(); 288 NothingToDo();
289 } 289 }
290 // TODO: allow this call to return failure, or move to SkBitmapDevice only. 290 // TODO: allow this call to return failure, or move to SkBitmapDevice only.
291 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE { 291 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE {
292 return fEmptyBitmap; 292 return fEmptyBitmap;
293 } 293 }
294 virtual bool onReadPixels(const SkBitmap& bitmap,
295 int x, int y,
296 SkCanvas::Config8888 config8888) SK_OVERRIDE {
297 NotSupported();
298 return false;
299 }
300 virtual void lockPixels() SK_OVERRIDE { NothingToDo(); } 294 virtual void lockPixels() SK_OVERRIDE { NothingToDo(); }
301 virtual void unlockPixels() SK_OVERRIDE { NothingToDo(); } 295 virtual void unlockPixels() SK_OVERRIDE { NothingToDo(); }
302 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal se; } 296 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal se; }
303 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return false; } 297 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return false; }
304 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImag eFilter::Context&, 298 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImag eFilter::Context&,
305 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { 299 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE {
306 return false; 300 return false;
307 } 301 }
308 302
309 private: 303 private:
(...skipping 28 matching lines...) Expand all
338 static void NotSupported() { 332 static void NotSupported() {
339 SkDEBUGFAIL("this method should never be called"); 333 SkDEBUGFAIL("this method should never be called");
340 } 334 }
341 335
342 static void NothingToDo() {} 336 static void NothingToDo() {}
343 337
344 typedef SkBaseDevice INHERITED; 338 typedef SkBaseDevice INHERITED;
345 }; 339 };
346 340
347 #endif // SkGatherPixelRefsAndRects_DEFINED 341 #endif // SkGatherPixelRefsAndRects_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698