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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 * If the device does not recognize or support this filter, | 289 * If the device does not recognize or support this filter, |
290 * it just returns false and leaves result and offset unchanged. | 290 * it just returns false and leaves result and offset unchanged. |
291 */ | 291 */ |
292 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, | 292 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, |
293 const SkImageFilter::Context&, | 293 const SkImageFilter::Context&, |
294 SkBitmap* /*result*/, SkIPoint* /*offset*/) { | 294 SkBitmap* /*result*/, SkIPoint* /*offset*/) { |
295 return false; | 295 return false; |
296 } | 296 } |
297 | 297 |
298 protected: | 298 protected: |
299 virtual SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) { r
eturn NULL; } | 299 virtual sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProp
s&); |
300 virtual bool onPeekPixels(SkPixmap*) { return false; } | 300 virtual bool onPeekPixels(SkPixmap*) { return false; } |
301 | 301 |
302 /** | 302 /** |
303 * The caller is responsible for "pre-clipping" the dst. The impl can assum
e that the dst | 303 * The caller is responsible for "pre-clipping" the dst. The impl can assum
e that the dst |
304 * image at the specified x,y offset will fit within the device's bounds. | 304 * image at the specified x,y offset will fit within the device's bounds. |
305 * | 305 * |
306 * This is explicitly asserted in readPixels(), the public way to call this
. | 306 * This is explicitly asserted in readPixels(), the public way to call this
. |
307 */ | 307 */ |
308 virtual bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y); | 308 virtual bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y); |
309 | 309 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 SkSurfaceProps fSurfaceProps; | 416 SkSurfaceProps fSurfaceProps; |
417 | 417 |
418 #ifdef SK_DEBUG | 418 #ifdef SK_DEBUG |
419 bool fAttachedToCanvas; | 419 bool fAttachedToCanvas; |
420 #endif | 420 #endif |
421 | 421 |
422 typedef SkRefCnt INHERITED; | 422 typedef SkRefCnt INHERITED; |
423 }; | 423 }; |
424 | 424 |
425 #endif | 425 #endif |
OLD | NEW |