OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
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 SkDevice_DEFINED | 8 #ifndef SkDevice_DEFINED |
9 #define SkDevice_DEFINED | 9 #define SkDevice_DEFINED |
10 | 10 |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 } | 367 } |
368 | 368 |
369 private: | 369 private: |
370 friend class SkCanvas; | 370 friend class SkCanvas; |
371 friend struct DeviceCM; //for setMatrixClip | 371 friend struct DeviceCM; //for setMatrixClip |
372 friend class SkDraw; | 372 friend class SkDraw; |
373 friend class SkDrawIter; | 373 friend class SkDrawIter; |
374 friend class SkDeviceFilteredPaint; | 374 friend class SkDeviceFilteredPaint; |
375 friend class SkImageFilter::DeviceProxy; | 375 friend class SkImageFilter::DeviceProxy; |
376 friend class SkNoPixelsBitmapDevice; | 376 friend class SkNoPixelsBitmapDevice; |
377 friend class SkSurface_Raster; | |
377 | 378 |
378 friend class SkSurface_Raster; | 379 /** |
380 * Will invoke the paint's imagefilter directly on the bitmap, and draw the result. | |
381 * Assumes that the caller has previously called canCallFilterSprite(). | |
382 */ | |
383 void filterSprite(const SkDraw&, const SkBitmap&, int x, int y, const SkPain t&); | |
Stephen White
2015/12/04 19:22:51
Since we're getting rid of drawSprite(), could we
reed1
2015/12/04 19:33:29
Agreed, the name is weird.
drawBitmapAsSprite sgt
| |
379 | 384 |
380 // used to change the backend's pixels (and possibly config/rowbytes) | 385 // used to change the backend's pixels (and possibly config/rowbytes) |
381 // but cannot change the width/height, so there should be no change to | 386 // but cannot change the width/height, so there should be no change to |
382 // any clip information. | 387 // any clip information. |
383 // TODO: move to SkBitmapDevice | 388 // TODO: move to SkBitmapDevice |
384 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) {} | 389 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) {} |
385 | 390 |
386 virtual bool forceConservativeRasterClip() const { return false; } | 391 virtual bool forceConservativeRasterClip() const { return false; } |
387 | 392 |
388 // just called by SkCanvas when built as a layer | 393 // just called by SkCanvas when built as a layer |
(...skipping 10 matching lines...) Expand all Loading... | |
399 SkSurfaceProps fSurfaceProps; | 404 SkSurfaceProps fSurfaceProps; |
400 | 405 |
401 #ifdef SK_DEBUG | 406 #ifdef SK_DEBUG |
402 bool fAttachedToCanvas; | 407 bool fAttachedToCanvas; |
403 #endif | 408 #endif |
404 | 409 |
405 typedef SkRefCnt INHERITED; | 410 typedef SkRefCnt INHERITED; |
406 }; | 411 }; |
407 | 412 |
408 #endif | 413 #endif |
OLD | NEW |