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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 14598023: add SkDrawPictureCallback optional parameter to drawPicture(), which can abort the picture drawing. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 const SkPath& path, SkScalar hOffset, 2124 const SkPath& path, SkScalar hOffset,
2125 SkScalar vOffset, const SkPaint& paint) { 2125 SkScalar vOffset, const SkPaint& paint) {
2126 SkMatrix matrix; 2126 SkMatrix matrix;
2127 2127
2128 matrix.setTranslate(hOffset, vOffset); 2128 matrix.setTranslate(hOffset, vOffset);
2129 this->drawTextOnPath(text, byteLength, path, &matrix, paint); 2129 this->drawTextOnPath(text, byteLength, path, &matrix, paint);
2130 } 2130 }
2131 2131
2132 /////////////////////////////////////////////////////////////////////////////// 2132 ///////////////////////////////////////////////////////////////////////////////
2133 2133
2134 void SkCanvas::drawPicture(SkPicture& picture) { 2134 void SkCanvas::drawPicture(SkPicture& pict, SkDrawPictureCallback* callback) {
2135 picture.draw(this); 2135 pict.draw(this, callback);
2136 } 2136 }
2137 2137
2138 /////////////////////////////////////////////////////////////////////////////// 2138 ///////////////////////////////////////////////////////////////////////////////
2139 /////////////////////////////////////////////////////////////////////////////// 2139 ///////////////////////////////////////////////////////////////////////////////
2140 2140
2141 SkCanvas::LayerIter::LayerIter(SkCanvas* canvas, bool skipEmptyClips) { 2141 SkCanvas::LayerIter::LayerIter(SkCanvas* canvas, bool skipEmptyClips) {
2142 SK_COMPILE_ASSERT(sizeof(fStorage) >= sizeof(SkDrawIter), fStorage_too_small ); 2142 SK_COMPILE_ASSERT(sizeof(fStorage) >= sizeof(SkDrawIter), fStorage_too_small );
2143 2143
2144 SkASSERT(canvas); 2144 SkASSERT(canvas);
2145 2145
(...skipping 25 matching lines...) Expand all
2171 return *paint; 2171 return *paint;
2172 } 2172 }
2173 2173
2174 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } 2174 const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); }
2175 int SkCanvas::LayerIter::x() const { return fImpl->getX(); } 2175 int SkCanvas::LayerIter::x() const { return fImpl->getX(); }
2176 int SkCanvas::LayerIter::y() const { return fImpl->getY(); } 2176 int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
2177 2177
2178 /////////////////////////////////////////////////////////////////////////////// 2178 ///////////////////////////////////////////////////////////////////////////////
2179 2179
2180 SkCanvas::ClipVisitor::~ClipVisitor() { } 2180 SkCanvas::ClipVisitor::~ClipVisitor() { }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698