OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
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 "SkCanvasPriv.h" | 8 #include "SkCanvasPriv.h" |
9 #include "SkClipStack.h" | 9 #include "SkClipStack.h" |
10 #include "SkDebugCanvas.h" | 10 #include "SkDebugCanvas.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 SkASSERT(!fCommandVector.isEmpty()); | 192 SkASSERT(!fCommandVector.isEmpty()); |
193 SkASSERT(index < fCommandVector.count()); | 193 SkASSERT(index < fCommandVector.count()); |
194 | 194 |
195 int saveCount = canvas->save(); | 195 int saveCount = canvas->save(); |
196 | 196 |
197 SkRect windowRect = SkRect::MakeWH(SkIntToScalar(canvas->getBaseLayerSize().
width()), | 197 SkRect windowRect = SkRect::MakeWH(SkIntToScalar(canvas->getBaseLayerSize().
width()), |
198 SkIntToScalar(canvas->getBaseLayerSize().
height())); | 198 SkIntToScalar(canvas->getBaseLayerSize().
height())); |
199 | 199 |
200 bool pathOpsMode = getAllowSimplifyClip(); | 200 bool pathOpsMode = getAllowSimplifyClip(); |
201 canvas->setAllowSimplifyClip(pathOpsMode); | 201 canvas->setAllowSimplifyClip(pathOpsMode); |
202 canvas->clear(SK_ColorTRANSPARENT); | 202 canvas->clear(SK_ColorWHITE); |
203 canvas->resetMatrix(); | 203 canvas->resetMatrix(); |
204 if (!windowRect.isEmpty()) { | 204 if (!windowRect.isEmpty()) { |
205 canvas->clipRect(windowRect, SkRegion::kReplace_Op); | 205 canvas->clipRect(windowRect, SkRegion::kReplace_Op); |
206 } | 206 } |
207 this->applyUserTransform(canvas); | 207 this->applyUserTransform(canvas); |
208 | 208 |
209 if (fPaintFilterCanvas) { | 209 if (fPaintFilterCanvas) { |
210 fPaintFilterCanvas->addCanvas(canvas); | 210 fPaintFilterCanvas->addCanvas(canvas); |
211 canvas = fPaintFilterCanvas.get(); | 211 canvas = fPaintFilterCanvas.get(); |
212 } | 212 } |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 } | 644 } |
645 | 645 |
646 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 646 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
647 if (fCalledAddStackData) { | 647 if (fCalledAddStackData) { |
648 fClipStackData.appendf("<br>"); | 648 fClipStackData.appendf("<br>"); |
649 addPathData(devPath, "pathOut"); | 649 addPathData(devPath, "pathOut"); |
650 return true; | 650 return true; |
651 } | 651 } |
652 return false; | 652 return false; |
653 } | 653 } |
OLD | NEW |