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

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

Issue 1491293002: detect when we can filter bitmaps/images directly, w/o a tmp layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move include to the top 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 | include/core/SkDevice.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 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 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 // only for canvasutils 1421 // only for canvasutils
1422 const SkRegion& internal_private_getTotalClip() const; 1422 const SkRegion& internal_private_getTotalClip() const;
1423 1423
1424 /* 1424 /*
1425 * Returns true if drawing the specified rect (or all if it is null) with t he specified 1425 * Returns true if drawing the specified rect (or all if it is null) with t he specified
1426 * paint (or default if null) would overwrite the entire root device of the canvas 1426 * paint (or default if null) would overwrite the entire root device of the canvas
1427 * (i.e. the canvas' surface if it had one). 1427 * (i.e. the canvas' surface if it had one).
1428 */ 1428 */
1429 bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*, ShaderOverri deOpacity) const; 1429 bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*, ShaderOverri deOpacity) const;
1430 1430
1431 /**
1432 * Returns true if the paint's imagefilter can be invoked directly, without needed a layer.
1433 */
1434 bool canDrawBitmapAsSprite(SkScalar x, SkScalar y, int w, int h, const SkPai nt&);
1431 1435
1432 /* These maintain a cache of the clip bounds in local coordinates, 1436 /* These maintain a cache of the clip bounds in local coordinates,
1433 (converted to 2s-compliment if floats are slow). 1437 (converted to 2s-compliment if floats are slow).
1434 */ 1438 */
1435 mutable SkRect fCachedLocalClipBounds; 1439 mutable SkRect fCachedLocalClipBounds;
1436 mutable bool fCachedLocalClipBoundsDirty; 1440 mutable bool fCachedLocalClipBoundsDirty;
1437 bool fAllowSoftClip; 1441 bool fAllowSoftClip;
1438 bool fAllowSimplifyClip; 1442 bool fAllowSimplifyClip;
1439 const bool fConservativeRasterClip; 1443 const bool fConservativeRasterClip;
1440 1444
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 1565
1562 class SkCanvasClipVisitor { 1566 class SkCanvasClipVisitor {
1563 public: 1567 public:
1564 virtual ~SkCanvasClipVisitor(); 1568 virtual ~SkCanvasClipVisitor();
1565 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1569 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1566 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1570 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1567 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1571 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1568 }; 1572 };
1569 1573
1570 #endif 1574 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698