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

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

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/core/SkPictureFlat.cpp ('k') | src/core/SkPixelRef.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 2012 Google Inc. 3 * Copyright 2012 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 8
9 #include "SkPictureStateTree.h" 9 #include "SkPictureStateTree.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 11
12 SK_DEFINE_INST_COUNT(SkPictureStateTree)
13
14 SkPictureStateTree::SkPictureStateTree() 12 SkPictureStateTree::SkPictureStateTree()
15 : fAlloc(2048) 13 : fAlloc(2048)
16 , fRoot(NULL) 14 , fRoot(NULL)
17 , fLastRestoredNode(NULL) 15 , fLastRestoredNode(NULL)
18 , fStateStack(sizeof(Draw), 16) { 16 , fStateStack(sizeof(Draw), 16) {
19 SkMatrix* identity = static_cast<SkMatrix*>(fAlloc.allocThrow(sizeof(SkMatri x))); 17 SkMatrix* identity = static_cast<SkMatrix*>(fAlloc.allocThrow(sizeof(SkMatri x)));
20 identity->reset(); 18 identity->reset();
21 fRoot = static_cast<Node*>(fAlloc.allocThrow(sizeof(Node))); 19 fRoot = static_cast<Node*>(fAlloc.allocThrow(sizeof(Node)));
22 fRoot->fParent = NULL; 20 fRoot->fParent = NULL;
23 fRoot->fMatrix = identity; 21 fRoot->fMatrix = identity;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if (fCurrentMatrix != draw->fMatrix) { 180 if (fCurrentMatrix != draw->fMatrix) {
183 SkMatrix tmp = *draw->fMatrix; 181 SkMatrix tmp = *draw->fMatrix;
184 tmp.postConcat(fPlaybackMatrix); 182 tmp.postConcat(fPlaybackMatrix);
185 fCanvas->setMatrix(tmp); 183 fCanvas->setMatrix(tmp);
186 fCurrentMatrix = draw->fMatrix; 184 fCurrentMatrix = draw->fMatrix;
187 } 185 }
188 186
189 ++fPlaybackIndex; 187 ++fPlaybackIndex;
190 return draw->fOffset; 188 return draw->fOffset;
191 } 189 }
OLDNEW
« no previous file with comments | « src/core/SkPictureFlat.cpp ('k') | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698