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

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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 this->drawPoints(draw, SkCanvas::kPolygon_PointMode, vertexCount, verts, paint); 290 this->drawPoints(draw, SkCanvas::kPolygon_PointMode, vertexCount, verts, paint);
291 } 291 }
292 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, 292 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
293 const SkPaint&) SK_OVERRIDE { 293 const SkPaint&) SK_OVERRIDE {
294 NothingToDo(); 294 NothingToDo();
295 } 295 }
296 // TODO: allow this call to return failure, or move to SkBitmapDevice only. 296 // TODO: allow this call to return failure, or move to SkBitmapDevice only.
297 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE { 297 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE {
298 return fEmptyBitmap; 298 return fEmptyBitmap;
299 } 299 }
300 virtual bool onReadPixels(const SkBitmap& bitmap,
301 int x, int y,
302 SkCanvas::Config8888 config8888) SK_OVERRIDE {
303 NotSupported();
304 return false;
305 }
306 virtual void lockPixels() SK_OVERRIDE { NothingToDo(); } 300 virtual void lockPixels() SK_OVERRIDE { NothingToDo(); }
307 virtual void unlockPixels() SK_OVERRIDE { NothingToDo(); } 301 virtual void unlockPixels() SK_OVERRIDE { NothingToDo(); }
308 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal se; } 302 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { return fal se; }
309 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return false; } 303 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { return false; }
310 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImag eFilter::Context&, 304 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImag eFilter::Context&,
311 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { 305 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE {
312 return false; 306 return false;
313 } 307 }
314 308
315 private: 309 private:
(...skipping 28 matching lines...) Expand all
344 static void NotSupported() { 338 static void NotSupported() {
345 SkDEBUGFAIL("this method should never be called"); 339 SkDEBUGFAIL("this method should never be called");
346 } 340 }
347 341
348 static void NothingToDo() {} 342 static void NothingToDo() {}
349 343
350 typedef SkBaseDevice INHERITED; 344 typedef SkBaseDevice INHERITED;
351 }; 345 };
352 346
353 #endif // SkGatherPixelRefsAndRects_DEFINED 347 #endif // SkGatherPixelRefsAndRects_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698