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

Side by Side Diff: src/utils/SkNWayCanvas.cpp

Issue 137833016: add SkCanvas constructor that explicitly creates no_config with dimensions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('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 /* 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
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 }
OLDNEW
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698