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

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

Issue 1523053003: add backdrop option to SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | samplecode/SampleLayers.cpp » ('j') | samplecode/SampleLayers.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 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 SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 int saveLayer(const SkRect& bounds, const SkPaint* paint) { 335 int saveLayer(const SkRect& bounds, const SkPaint* paint) {
336 return this->saveLayer(&bounds, paint); 336 return this->saveLayer(&bounds, paint);
337 } 337 }
338 338
339 /** 339 /**
340 * Temporary name. 340 * Temporary name.
341 * Will allow any requests for LCD text to be respected, so the caller must be careful to 341 * Will allow any requests for LCD text to be respected, so the caller must be careful to
342 * only draw on top of opaque sections of the layer to get good results. 342 * only draw on top of opaque sections of the layer to get good results.
343 */ 343 */
344 int saveLayerPreserveLCDTextRequests(const SkRect* bounds, const SkPaint* pa int); 344 int saveLayerPreserveLCDTextRequests(const SkRect* bounds, const SkPaint* pa int);
345 345
robertphillips 2015/12/15 13:28:38 dox ?
346 int saveLayerWithPickup(const SkRect* bounds, const SkPaint* paint, SkImageF ilter*);
347
346 /** DEPRECATED - use saveLayer(const SkRect*, const SkPaint*) instead. 348 /** DEPRECATED - use saveLayer(const SkRect*, const SkPaint*) instead.
347 349
348 This behaves the same as saveLayer(const SkRect*, const SkPaint*), 350 This behaves the same as saveLayer(const SkRect*, const SkPaint*),
349 but it allows fine-grained control of which state bits to be saved 351 but it allows fine-grained control of which state bits to be saved
350 (and subsequently restored). 352 (and subsequently restored).
351 353
352 @param bounds (may be null) This rect, if non-null, is used as a hint to 354 @param bounds (may be null) This rect, if non-null, is used as a hint to
353 limit the size of the offscreen, and thus drawing may be 355 limit the size of the offscreen, and thus drawing may be
354 clipped to it, though that clipping is not guaranteed to 356 clipped to it, though that clipping is not guaranteed to
355 happen. If exact clipping is desired, use clipRect(). 357 happen. If exact clipping is desired, use clipRect().
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 * Gets the size/origin of the top level layer in global canvas coordinates. We don't want this 1413 * Gets the size/origin of the top level layer in global canvas coordinates. We don't want this
1412 * to be public because it exposes decisions about layer sizes that are inte rnal to the canvas. 1414 * to be public because it exposes decisions about layer sizes that are inte rnal to the canvas.
1413 */ 1415 */
1414 SkISize getTopLayerSize() const; 1416 SkISize getTopLayerSize() const;
1415 SkIPoint getTopLayerOrigin() const; 1417 SkIPoint getTopLayerOrigin() const;
1416 1418
1417 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, 1419 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
1418 const SkRect& dst, const SkPaint* paint, 1420 const SkRect& dst, const SkPaint* paint,
1419 SrcRectConstraint); 1421 SrcRectConstraint);
1420 void internalDrawPaint(const SkPaint& paint); 1422 void internalDrawPaint(const SkPaint& paint);
1421 void internalSaveLayer(const SkRect* bounds, const SkPaint*, SaveFlags, Save LayerStrategy); 1423 void internalSaveLayer(const SkRect* bounds, const SkPaint*, SaveFlags, Save LayerStrategy,
1424 SkImageFilter*);
1422 void internalDrawDevice(SkBaseDevice*, int x, int y, const SkPaint*, bool is BitmapDevice); 1425 void internalDrawDevice(SkBaseDevice*, int x, int y, const SkPaint*, bool is BitmapDevice);
1423 1426
1424 // shared by save() and saveLayer() 1427 // shared by save() and saveLayer()
1425 void internalSave(); 1428 void internalSave();
1426 void internalRestore(); 1429 void internalRestore();
1427 static void DrawRect(const SkDraw& draw, const SkPaint& paint, 1430 static void DrawRect(const SkDraw& draw, const SkPaint& paint,
1428 const SkRect& r, SkScalar textSize); 1431 const SkRect& r, SkScalar textSize);
1429 static void DrawTextDecorations(const SkDraw& draw, const SkPaint& paint, 1432 static void DrawTextDecorations(const SkDraw& draw, const SkPaint& paint,
1430 const char text[], size_t byteLength, 1433 const char text[], size_t byteLength,
1431 SkScalar x, SkScalar y); 1434 SkScalar x, SkScalar y);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 1580
1578 class SkCanvasClipVisitor { 1581 class SkCanvasClipVisitor {
1579 public: 1582 public:
1580 virtual ~SkCanvasClipVisitor(); 1583 virtual ~SkCanvasClipVisitor();
1581 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1584 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1582 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1585 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1583 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1586 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1584 }; 1587 };
1585 1588
1586 #endif 1589 #endif
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleLayers.cpp » ('j') | samplecode/SampleLayers.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698