OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 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 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkCanvasDrawable.h" | |
10 #include "SkCanvasPriv.h" | 9 #include "SkCanvasPriv.h" |
11 #include "SkBitmapDevice.h" | 10 #include "SkBitmapDevice.h" |
12 #include "SkDeviceImageFilterProxy.h" | 11 #include "SkDeviceImageFilterProxy.h" |
13 #include "SkDraw.h" | 12 #include "SkDraw.h" |
| 13 #include "SkDrawable.h" |
14 #include "SkDrawFilter.h" | 14 #include "SkDrawFilter.h" |
15 #include "SkDrawLooper.h" | 15 #include "SkDrawLooper.h" |
16 #include "SkImage.h" | 16 #include "SkImage.h" |
17 #include "SkMetaData.h" | 17 #include "SkMetaData.h" |
18 #include "SkPathOps.h" | 18 #include "SkPathOps.h" |
19 #include "SkPatchUtils.h" | 19 #include "SkPatchUtils.h" |
20 #include "SkPicture.h" | 20 #include "SkPicture.h" |
21 #include "SkRasterClip.h" | 21 #include "SkRasterClip.h" |
22 #include "SkReadPixelsRec.h" | 22 #include "SkReadPixelsRec.h" |
23 #include "SkRRect.h" | 23 #include "SkRRect.h" |
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2286 | 2286 |
2287 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, NULL) | 2287 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, NULL) |
2288 | 2288 |
2289 while (iter.next()) { | 2289 while (iter.next()) { |
2290 iter.fDevice->drawPatch(iter, cubics, colors, texCoords, xmode, paint); | 2290 iter.fDevice->drawPatch(iter, cubics, colors, texCoords, xmode, paint); |
2291 } | 2291 } |
2292 | 2292 |
2293 LOOPER_END | 2293 LOOPER_END |
2294 } | 2294 } |
2295 | 2295 |
2296 void SkCanvas::EXPERIMENTAL_drawDrawable(SkCanvasDrawable* dr) { | 2296 void SkCanvas::drawDrawable(SkDrawable* dr) { |
2297 if (dr && !this->quickReject(dr->getBounds())) { | 2297 if (dr && !this->quickReject(dr->getBounds())) { |
2298 this->onDrawDrawable(dr); | 2298 this->onDrawDrawable(dr); |
2299 } | 2299 } |
2300 } | 2300 } |
2301 | 2301 |
2302 void SkCanvas::onDrawDrawable(SkCanvasDrawable* dr) { | 2302 void SkCanvas::onDrawDrawable(SkDrawable* dr) { |
2303 dr->draw(this); | 2303 dr->draw(this); |
2304 } | 2304 } |
2305 | 2305 |
2306 ////////////////////////////////////////////////////////////////////////////// | 2306 ////////////////////////////////////////////////////////////////////////////// |
2307 // These methods are NOT virtual, and therefore must call back into virtual | 2307 // These methods are NOT virtual, and therefore must call back into virtual |
2308 // methods, rather than actually drawing themselves. | 2308 // methods, rather than actually drawing themselves. |
2309 ////////////////////////////////////////////////////////////////////////////// | 2309 ////////////////////////////////////////////////////////////////////////////// |
2310 | 2310 |
2311 void SkCanvas::drawARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b, | 2311 void SkCanvas::drawARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b, |
2312 SkXfermode::Mode mode) { | 2312 SkXfermode::Mode mode) { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2559 } | 2559 } |
2560 | 2560 |
2561 if (matrix) { | 2561 if (matrix) { |
2562 canvas->concat(*matrix); | 2562 canvas->concat(*matrix); |
2563 } | 2563 } |
2564 } | 2564 } |
2565 | 2565 |
2566 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 2566 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
2567 fCanvas->restoreToCount(fSaveCount); | 2567 fCanvas->restoreToCount(fSaveCount); |
2568 } | 2568 } |
OLD | NEW |