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

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

Issue 554033003: 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
377 // just called by SkCanvas when built as a layer 375 // just called by SkCanvas when built as a layer
378 void setOrigin(int x, int y) { fOrigin.set(x, y); } 376 void setOrigin(int x, int y) { fOrigin.set(x, y); }
379 // just called by SkCanvas for saveLayer 377 // just called by SkCanvas for saveLayer
380 SkBaseDevice* createCompatibleDeviceForSaveLayer(const SkImageInfo&); 378 SkBaseDevice* createCompatibleDeviceForSaveLayer(const SkImageInfo&);
381 379
382 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) { 380 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) {
383 return NULL; 381 return NULL;
384 } 382 }
385 383
386 /** Causes any deferred drawing to the device to be completed. 384 /** Causes any deferred drawing to the device to be completed.
387 */ 385 */
388 virtual void flush() {} 386 virtual void flush() {}
389 387
390 virtual SkImageFilter::Cache* getImageFilterCache() { return NULL; } 388 virtual SkImageFilter::Cache* getImageFilterCache() { return NULL; }
391 389
392 SkIPoint fOrigin; 390 SkIPoint fOrigin;
393 SkMetaData* fMetaData; 391 SkMetaData* fMetaData;
394 392
395 #ifdef SK_DEBUG 393 #ifdef SK_DEBUG
396 bool fAttachedToCanvas; 394 bool fAttachedToCanvas;
397 #endif 395 #endif
398 396
399 typedef SkRefCnt INHERITED; 397 typedef SkRefCnt INHERITED;
400 }; 398 };
401 399
402 #endif 400 #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