| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 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 #include "SkNWayCanvas.h" | 8 #include "SkNWayCanvas.h" |
| 9 | 9 |
| 10 static SkBitmap make_noconfig_bm(int width, int height) { | |
| 11 SkBitmap bm; | |
| 12 bm.setConfig(SkBitmap::kNo_Config, width, height); | |
| 13 return bm; | |
| 14 } | |
| 15 | |
| 16 SkNWayCanvas::SkNWayCanvas(int width, int height) | 10 SkNWayCanvas::SkNWayCanvas(int width, int height) |
| 17 : INHERITED(make_noconfig_bm(width, height)) {} | 11 : INHERITED(width, height) {} |
| 18 | 12 |
| 19 SkNWayCanvas::~SkNWayCanvas() { | 13 SkNWayCanvas::~SkNWayCanvas() { |
| 20 this->removeAll(); | 14 this->removeAll(); |
| 21 } | 15 } |
| 22 | 16 |
| 23 void SkNWayCanvas::addCanvas(SkCanvas* canvas) { | 17 void SkNWayCanvas::addCanvas(SkCanvas* canvas) { |
| 24 if (canvas) { | 18 if (canvas) { |
| 25 canvas->ref(); | 19 canvas->ref(); |
| 26 *fList.append() = canvas; | 20 *fList.append() = canvas; |
| 27 } | 21 } |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 iter->addComment(kywd, value); | 342 iter->addComment(kywd, value); |
| 349 } | 343 } |
| 350 } | 344 } |
| 351 | 345 |
| 352 void SkNWayCanvas::endCommentGroup() { | 346 void SkNWayCanvas::endCommentGroup() { |
| 353 Iter iter(fList); | 347 Iter iter(fList); |
| 354 while (iter.next()) { | 348 while (iter.next()) { |
| 355 iter->endCommentGroup(); | 349 iter->endCommentGroup(); |
| 356 } | 350 } |
| 357 } | 351 } |
| OLD | NEW |