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

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

Issue 2147963002: Revert "Added the framework for having canvas/recorder/picture record depth_set's." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/SkPictureFlat.h ('k') | src/core/SkPictureRecord.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 2014 Google Inc. 2 * Copyright 2014 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 #include "SkPictureData.h" 10 #include "SkPictureData.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 DrawType op, 122 DrawType op,
123 uint32_t size, 123 uint32_t size,
124 SkCanvas* canvas, 124 SkCanvas* canvas,
125 const SkMatrix& initialMatrix) { 125 const SkMatrix& initialMatrix) {
126 switch (op) { 126 switch (op) {
127 case NOOP: { 127 case NOOP: {
128 SkASSERT(size >= 4); 128 SkASSERT(size >= 4);
129 reader->skip(size - 4); 129 reader->skip(size - 4);
130 } break; 130 } break;
131 case CLIP_PATH: { 131 case CLIP_PATH: {
132 const SkPath& path = fPictureData->getPath(reader); 132 const SkPath& path = fPictureData->getPath(reader);
133 uint32_t packed = reader->readInt(); 133 uint32_t packed = reader->readInt();
134 SkRegion::Op regionOp = ClipParams_unpackRegionOp(packed); 134 SkRegion::Op regionOp = ClipParams_unpackRegionOp(packed);
135 bool doAA = ClipParams_unpackDoAA(packed); 135 bool doAA = ClipParams_unpackDoAA(packed);
136 size_t offsetToRestore = reader->readInt(); 136 size_t offsetToRestore = reader->readInt();
137 SkASSERT(!offsetToRestore || offsetToRestore >= reader->offset()); 137 SkASSERT(!offsetToRestore || offsetToRestore >= reader->offset());
138 canvas->clipPath(path, regionOp, doAA); 138 canvas->clipPath(path, regionOp, doAA);
139 if (canvas->isClipEmpty() && offsetToRestore) { 139 if (canvas->isClipEmpty() && offsetToRestore) {
140 reader->skip(offsetToRestore - reader->offset()); 140 reader->skip(offsetToRestore - reader->offset());
141 } 141 }
142 } break; 142 } break;
143 case CLIP_REGION: { 143 case CLIP_REGION: {
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 case SKEW: { 609 case SKEW: {
610 SkScalar sx = reader->readScalar(); 610 SkScalar sx = reader->readScalar();
611 SkScalar sy = reader->readScalar(); 611 SkScalar sy = reader->readScalar();
612 canvas->skew(sx, sy); 612 canvas->skew(sx, sy);
613 } break; 613 } break;
614 case TRANSLATE: { 614 case TRANSLATE: {
615 SkScalar dx = reader->readScalar(); 615 SkScalar dx = reader->readScalar();
616 SkScalar dy = reader->readScalar(); 616 SkScalar dy = reader->readScalar();
617 canvas->translate(dx, dy); 617 canvas->translate(dx, dy);
618 } break; 618 } break;
619 case TRANSLATE_Z: {
620 SkScalar dz = reader->readScalar();
621 canvas->translateZ(dz);
622 }
623 default: 619 default:
624 SkASSERTF(false, "Unknown draw type: %d", op); 620 SkASSERTF(false, "Unknown draw type: %d", op);
625 } 621 }
626 } 622 }
OLDNEW
« no previous file with comments | « src/core/SkPictureFlat.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698