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

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

Issue 189883010: hide getTotalClip, so we can eventually remove it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "SkCanvasStateUtils.h" 8 #include "SkCanvasStateUtils.h"
9 9
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 canvas->replayClips(&validator); 187 canvas->replayClips(&validator);
188 if (validator.failed()) { 188 if (validator.failed()) {
189 SkErrorInternals::SetError(kInvalidOperation_SkError, 189 SkErrorInternals::SetError(kInvalidOperation_SkError,
190 "CaptureCanvasState does not support canvases with antialiased c lips.\n"); 190 "CaptureCanvasState does not support canvases with antialiased c lips.\n");
191 return NULL; 191 return NULL;
192 } 192 }
193 193
194 SkAutoTDelete<SkCanvasState> canvasState(SkNEW_ARGS(SkCanvasState, (canvas)) ); 194 SkAutoTDelete<SkCanvasState> canvasState(SkNEW_ARGS(SkCanvasState, (canvas)) );
195 195
196 // decompose the total matrix and clip 196 // decompose the total matrix and clip
197 setup_MC_state(&canvasState->mcState, canvas->getTotalMatrix(), canvas->getT otalClip()); 197 setup_MC_state(&canvasState->mcState, canvas->getTotalMatrix(),
198 canvas->internal_private_getTotalClip());
198 199
199 /* 200 /*
200 * decompose the layers 201 * decompose the layers
201 * 202 *
202 * storage is allocated on the stack for the first 3 layers. It is common in 203 * storage is allocated on the stack for the first 3 layers. It is common in
203 * some view systems (e.g. Android) that a few non-clipped layers are presen t 204 * some view systems (e.g. Android) that a few non-clipped layers are presen t
204 * and we will not need to malloc any additional memory in those cases. 205 * and we will not need to malloc any additional memory in those cases.
205 */ 206 */
206 SkSWriter32<3*sizeof(SkCanvasLayerState)> layerWriter; 207 SkSWriter32<3*sizeof(SkCanvasLayerState)> layerWriter;
207 int layerCount = 0; 208 int layerCount = 0;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 334 }
334 335
335 return canvas.detach(); 336 return canvas.detach();
336 } 337 }
337 338
338 //////////////////////////////////////////////////////////////////////////////// 339 ////////////////////////////////////////////////////////////////////////////////
339 340
340 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) { 341 void SkCanvasStateUtils::ReleaseCanvasState(SkCanvasState* state) {
341 SkDELETE(state); 342 SkDELETE(state);
342 } 343 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698