| OLD | NEW |
| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 virtual ~SkCanvas(); | 115 virtual ~SkCanvas(); |
| 116 | 116 |
| 117 SkMetaData& getMetaData(); | 117 SkMetaData& getMetaData(); |
| 118 | 118 |
| 119 /** | 119 /** |
| 120 * Return ImageInfo for this canvas. If the canvas is not backed by pixels | 120 * Return ImageInfo for this canvas. If the canvas is not backed by pixels |
| 121 * (cpu or gpu), then the info's ColorType will be kUnknown_SkColorType. | 121 * (cpu or gpu), then the info's ColorType will be kUnknown_SkColorType. |
| 122 */ | 122 */ |
| 123 SkImageInfo imageInfo() const; | 123 SkImageInfo imageInfo() const; |
| 124 | 124 |
| 125 /** |
| 126 * If the canvas is backed by pixels (cpu or gpu), this writes a copy of th
e SurfaceProps |
| 127 * for the canvas to the location supplied by the caller, and returns true.
Otherwise, |
| 128 * return false and leave the supplied props unchanged. |
| 129 */ |
| 130 bool getProps(SkSurfaceProps*) const; |
| 131 |
| 125 /////////////////////////////////////////////////////////////////////////// | 132 /////////////////////////////////////////////////////////////////////////// |
| 126 | 133 |
| 127 /** | 134 /** |
| 128 * Trigger the immediate execution of all pending draw operations. For the
GPU | 135 * Trigger the immediate execution of all pending draw operations. For the
GPU |
| 129 * backend this will resolve all rendering to the GPU surface backing the | 136 * backend this will resolve all rendering to the GPU surface backing the |
| 130 * SkSurface that owns this canvas. | 137 * SkSurface that owns this canvas. |
| 131 */ | 138 */ |
| 132 void flush(); | 139 void flush(); |
| 133 | 140 |
| 134 /** | 141 /** |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 | 1576 |
| 1570 class SkCanvasClipVisitor { | 1577 class SkCanvasClipVisitor { |
| 1571 public: | 1578 public: |
| 1572 virtual ~SkCanvasClipVisitor(); | 1579 virtual ~SkCanvasClipVisitor(); |
| 1573 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1580 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1574 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1581 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1575 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1582 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1576 }; | 1583 }; |
| 1577 | 1584 |
| 1578 #endif | 1585 #endif |
| OLD | NEW |