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 270 matching lines...) Loading... |
281 * it just returns false and leaves result and offset unchanged. | 281 * it just returns false and leaves result and offset unchanged. |
282 */ | 282 */ |
283 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, | 283 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, |
284 const SkImageFilter::Context& ctx, | 284 const SkImageFilter::Context& ctx, |
285 SkBitmap* result, SkIPoint* offset) { | 285 SkBitmap* result, SkIPoint* offset) { |
286 return false; | 286 return false; |
287 } | 287 } |
288 | 288 |
289 protected: | 289 protected: |
290 // default impl returns NULL | 290 // default impl returns NULL |
291 virtual SkSurface* newSurface(const SkImageInfo&); | 291 virtual SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&); |
292 | 292 |
293 // default impl returns NULL | 293 // default impl returns NULL |
294 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); | 294 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); |
295 | 295 |
296 /** | 296 /** |
297 * The caller is responsible for "pre-clipping" the dst. The impl can assum
e that the dst | 297 * The caller is responsible for "pre-clipping" the dst. The impl can assum
e that the dst |
298 * image at the specified x,y offset will fit within the device's bounds. | 298 * image at the specified x,y offset will fit within the device's bounds. |
299 * | 299 * |
300 * This is explicitly asserted in readPixels(), the public way to call this
. | 300 * This is explicitly asserted in readPixels(), the public way to call this
. |
301 */ | 301 */ |
(...skipping 34 matching lines...) Loading... |
336 * of 'picture'. If optimization data is available (due to an earlier | 336 * of 'picture'. If optimization data is available (due to an earlier |
337 * 'optimize' call) this entry point should make use of it and return true | 337 * 'optimize' call) this entry point should make use of it and return true |
338 * if all rendering has been done. If false is returned, SkCanvas will | 338 * if all rendering has been done. If false is returned, SkCanvas will |
339 * perform its own rendering pass. It is acceptable for the backend | 339 * perform its own rendering pass. It is acceptable for the backend |
340 * to perform some device-specific warm up tasks and then let SkCanvas | 340 * to perform some device-specific warm up tasks and then let SkCanvas |
341 * perform the main rendering loop (by return false from here). | 341 * perform the main rendering loop (by return false from here). |
342 */ | 342 */ |
343 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM
atrix*, | 343 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM
atrix*, |
344 const SkPaint*); | 344 const SkPaint*); |
345 | 345 |
| 346 void setPixelGeometry(SkPixelGeometry geo); |
| 347 |
346 private: | 348 private: |
347 friend class SkCanvas; | 349 friend class SkCanvas; |
348 friend struct DeviceCM; //for setMatrixClip | 350 friend struct DeviceCM; //for setMatrixClip |
349 friend class SkDraw; | 351 friend class SkDraw; |
350 friend class SkDrawIter; | 352 friend class SkDrawIter; |
351 friend class SkDeviceFilteredPaint; | 353 friend class SkDeviceFilteredPaint; |
352 friend class SkDeviceImageFilterProxy; | 354 friend class SkDeviceImageFilterProxy; |
353 friend class SkDeferredDevice; // for newSurface | 355 friend class SkDeferredDevice; // for newSurface |
354 | 356 |
355 friend class SkSurface_Raster; | 357 friend class SkSurface_Raster; |
(...skipping 26 matching lines...) Loading... |
382 SkDeviceProperties* fLeakyProperties; // will always exist. | 384 SkDeviceProperties* fLeakyProperties; // will always exist. |
383 | 385 |
384 #ifdef SK_DEBUG | 386 #ifdef SK_DEBUG |
385 bool fAttachedToCanvas; | 387 bool fAttachedToCanvas; |
386 #endif | 388 #endif |
387 | 389 |
388 typedef SkRefCnt INHERITED; | 390 typedef SkRefCnt INHERITED; |
389 }; | 391 }; |
390 | 392 |
391 #endif | 393 #endif |
OLD | NEW |