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

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

Issue 560713002: Revert of Revert of allow canvas to force conservative clips (for speed) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « include/core/SkCanvas.h ('k') | include/gpu/SkGpuDevice.h » ('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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 friend class SkDeferredDevice; // for newSurface 365 friend class SkDeferredDevice; // for newSurface
366 366
367 friend class SkSurface_Raster; 367 friend class SkSurface_Raster;
368 368
369 // used to change the backend's pixels (and possibly config/rowbytes) 369 // used to change the backend's pixels (and possibly config/rowbytes)
370 // but cannot change the width/height, so there should be no change to 370 // but cannot change the width/height, so there should be no change to
371 // any clip information. 371 // any clip information.
372 // TODO: move to SkBitmapDevice 372 // TODO: move to SkBitmapDevice
373 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) {} 373 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) {}
374 374
375 virtual bool forceConservativeRasterClip() const { return false; }
376
375 // just called by SkCanvas when built as a layer 377 // just called by SkCanvas when built as a layer
376 void setOrigin(int x, int y) { fOrigin.set(x, y); } 378 void setOrigin(int x, int y) { fOrigin.set(x, y); }
377 // just called by SkCanvas for saveLayer 379 // just called by SkCanvas for saveLayer
378 SkBaseDevice* createCompatibleDeviceForSaveLayer(const SkImageInfo&); 380 SkBaseDevice* createCompatibleDeviceForSaveLayer(const SkImageInfo&);
379 381
380 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) { 382 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) {
381 return NULL; 383 return NULL;
382 } 384 }
383 385
384 /** Causes any deferred drawing to the device to be completed. 386 /** Causes any deferred drawing to the device to be completed.
385 */ 387 */
386 virtual void flush() {} 388 virtual void flush() {}
387 389
388 virtual SkImageFilter::Cache* getImageFilterCache() { return NULL; } 390 virtual SkImageFilter::Cache* getImageFilterCache() { return NULL; }
389 391
390 SkIPoint fOrigin; 392 SkIPoint fOrigin;
391 SkMetaData* fMetaData; 393 SkMetaData* fMetaData;
392 394
393 #ifdef SK_DEBUG 395 #ifdef SK_DEBUG
394 bool fAttachedToCanvas; 396 bool fAttachedToCanvas;
395 #endif 397 #endif
396 398
397 typedef SkRefCnt INHERITED; 399 typedef SkRefCnt INHERITED;
398 }; 400 };
399 401
400 #endif 402 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | include/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698