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

Side by Side Diff: include/core/SkDevice.h

Issue 1198603002: Rename all things "leaky" in SkDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 /** 302 /**
303 * The caller is responsible for "pre-clipping" the src. The impl can assum e that the src 303 * The caller is responsible for "pre-clipping" the src. The impl can assum e that the src
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 writePixelsDirect(), the public way to ca ll this. 306 * This is explicitly asserted in writePixelsDirect(), the public way to ca ll this.
307 */ 307 */
308 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, i nt y); 308 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, i nt y);
309 309
310 virtual bool onAccessPixels(SkPixmap*) { return false; } 310 virtual bool onAccessPixels(SkPixmap*) { return false; }
311 311
312 /** 312 const SkSurfaceProps& surfaceProps() const {
313 * Leaky properties are those which the device should be applying but it is n't. 313 return fSurfaceProps;
314 * These properties will be applied by the draw, when and as it can.
315 * If the device does handle a property, that property should be set to the identity value
316 * for that property, effectively making it non-leaky.
317 */
318 const SkSurfaceProps& getLeakyProperties() const {
319 return fLeakyProperties;
320 } 314 }
321 315
322 /** 316 /**
323 * PRIVATE / EXPERIMENTAL -- do not call 317 * PRIVATE / EXPERIMENTAL -- do not call
324 * This entry point gives the backend an opportunity to take over the rende ring 318 * This entry point gives the backend an opportunity to take over the rende ring
325 * of 'picture'. If optimization data is available (due to an earlier 319 * of 'picture'. If optimization data is available (due to an earlier
326 * 'optimize' call) this entry point should make use of it and return true 320 * 'optimize' call) this entry point should make use of it and return true
327 * if all rendering has been done. If false is returned, SkCanvas will 321 * if all rendering has been done. If false is returned, SkCanvas will
328 * perform its own rendering pass. It is acceptable for the backend 322 * perform its own rendering pass. It is acceptable for the backend
329 * to perform some device-specific warm up tasks and then let SkCanvas 323 * to perform some device-specific warm up tasks and then let SkCanvas
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 void setOrigin(int x, int y) { fOrigin.set(x, y); } 386 void setOrigin(int x, int y) { fOrigin.set(x, y); }
393 387
394 /** Causes any deferred drawing to the device to be completed. 388 /** Causes any deferred drawing to the device to be completed.
395 */ 389 */
396 virtual void flush() {} 390 virtual void flush() {}
397 391
398 virtual SkImageFilter::Cache* getImageFilterCache() { return NULL; } 392 virtual SkImageFilter::Cache* getImageFilterCache() { return NULL; }
399 393
400 SkIPoint fOrigin; 394 SkIPoint fOrigin;
401 SkMetaData* fMetaData; 395 SkMetaData* fMetaData;
402 SkSurfaceProps fLeakyProperties; 396 SkSurfaceProps fSurfaceProps;
403 397
404 #ifdef SK_DEBUG 398 #ifdef SK_DEBUG
405 bool fAttachedToCanvas; 399 bool fAttachedToCanvas;
406 #endif 400 #endif
407 401
408 typedef SkRefCnt INHERITED; 402 typedef SkRefCnt INHERITED;
409 }; 403 };
410 404
411 #endif 405 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698