| 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 "SkLayer.h" | 8 #include "SkLayer.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 fMatrix.reset(); | 29 fMatrix.reset(); |
| 30 fChildrenMatrix.reset(); | 30 fChildrenMatrix.reset(); |
| 31 fFlags = 0; | 31 fFlags = 0; |
| 32 | 32 |
| 33 #ifdef DEBUG_TRACK_NEW_DELETE | 33 #ifdef DEBUG_TRACK_NEW_DELETE |
| 34 gLayerAllocCount += 1; | 34 gLayerAllocCount += 1; |
| 35 SkDebugf("SkLayer new: %d\n", gLayerAllocCount); | 35 SkDebugf("SkLayer new: %d\n", gLayerAllocCount); |
| 36 #endif | 36 #endif |
| 37 } | 37 } |
| 38 | 38 |
| 39 SkLayer::SkLayer(const SkLayer& src) { | 39 SkLayer::SkLayer(const SkLayer& src) : INHERITED() { |
| 40 fParent = NULL; | 40 fParent = NULL; |
| 41 m_opacity = src.m_opacity; | 41 m_opacity = src.m_opacity; |
| 42 m_size = src.m_size; | 42 m_size = src.m_size; |
| 43 m_position = src.m_position; | 43 m_position = src.m_position; |
| 44 m_anchorPoint = src.m_anchorPoint; | 44 m_anchorPoint = src.m_anchorPoint; |
| 45 | 45 |
| 46 fMatrix = src.fMatrix; | 46 fMatrix = src.fMatrix; |
| 47 fChildrenMatrix = src.fChildrenMatrix; | 47 fChildrenMatrix = src.fChildrenMatrix; |
| 48 fFlags = src.fFlags; | 48 fFlags = src.fFlags; |
| 49 | 49 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 #endif | 223 #endif |
| 224 | 224 |
| 225 int count = this->countChildren(); | 225 int count = this->countChildren(); |
| 226 if (count > 0) { | 226 if (count > 0) { |
| 227 canvas->concat(this->getChildrenMatrix()); | 227 canvas->concat(this->getChildrenMatrix()); |
| 228 for (int i = 0; i < count; i++) { | 228 for (int i = 0; i < count; i++) { |
| 229 this->getChild(i)->draw(canvas, opacity); | 229 this->getChild(i)->draw(canvas, opacity); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 } | 232 } |
| OLD | NEW |