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

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

Issue 777643003: use ClipOp instead of SkRegion for clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/utils/SkPictureUtils.cpp ('k') | src/utils/debugger/SkDrawCommand.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
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
7
8 #include "SkProxyCanvas.h" 8 #include "SkProxyCanvas.h"
9 9
10 SkProxyCanvas::SkProxyCanvas(SkCanvas* proxy) : fProxy(proxy) { 10 SkProxyCanvas::SkProxyCanvas(SkCanvas* proxy) : fProxy(proxy) {
11 SkSafeRef(fProxy); 11 SkSafeRef(fProxy);
12 } 12 }
13 13
14 SkProxyCanvas::~SkProxyCanvas() { 14 SkProxyCanvas::~SkProxyCanvas() {
15 SkSafeUnref(fProxy); 15 SkSafeUnref(fProxy);
16 } 16 }
17 17
(...skipping 25 matching lines...) Expand all
43 fProxy->concat(matrix); 43 fProxy->concat(matrix);
44 this->INHERITED::didConcat(matrix); 44 this->INHERITED::didConcat(matrix);
45 } 45 }
46 46
47 void SkProxyCanvas::didSetMatrix(const SkMatrix& matrix) { 47 void SkProxyCanvas::didSetMatrix(const SkMatrix& matrix) {
48 fProxy->setMatrix(matrix); 48 fProxy->setMatrix(matrix);
49 this->INHERITED::didSetMatrix(matrix); 49 this->INHERITED::didSetMatrix(matrix);
50 } 50 }
51 51
52 void SkProxyCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 52 void SkProxyCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
53 fProxy->clipRect(rect, op, kSoft_ClipEdgeStyle == edgeStyle); 53 fProxy->legacyClipRect(rect, op, kSoft_ClipEdgeStyle == edgeStyle);
54 } 54 }
55 55
56 void SkProxyCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeS tyle edgeStyle) { 56 void SkProxyCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeS tyle edgeStyle) {
57 fProxy->clipRRect(rrect, op, kSoft_ClipEdgeStyle == edgeStyle); 57 fProxy->legacyClipRRect(rrect, op, kSoft_ClipEdgeStyle == edgeStyle);
58 } 58 }
59 59
60 void SkProxyCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 60 void SkProxyCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
61 fProxy->clipPath(path, op, kSoft_ClipEdgeStyle == edgeStyle); 61 fProxy->legacyClipPath(path, op, kSoft_ClipEdgeStyle == edgeStyle);
62 } 62 }
63 63
64 void SkProxyCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 64 void SkProxyCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
65 fProxy->clipRegion(deviceRgn, op); 65 fProxy->legacyClipRegion(deviceRgn, op);
66 } 66 }
67 67
68 void SkProxyCanvas::drawPaint(const SkPaint& paint) { 68 void SkProxyCanvas::drawPaint(const SkPaint& paint) {
69 fProxy->drawPaint(paint); 69 fProxy->drawPaint(paint);
70 } 70 }
71 71
72 void SkProxyCanvas::drawPoints(PointMode mode, size_t count, 72 void SkProxyCanvas::drawPoints(PointMode mode, size_t count,
73 const SkPoint pts[], const SkPaint& paint) { 73 const SkPoint pts[], const SkPaint& paint) {
74 fProxy->drawPoints(mode, count, pts, paint); 74 fProxy->drawPoints(mode, count, pts, paint);
75 } 75 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 fProxy->addComment(kywd, value); 184 fProxy->addComment(kywd, value);
185 } 185 }
186 186
187 void SkProxyCanvas::endCommentGroup() { 187 void SkProxyCanvas::endCommentGroup() {
188 fProxy->endCommentGroup(); 188 fProxy->endCommentGroup();
189 } 189 }
190 190
191 SkDrawFilter* SkProxyCanvas::setDrawFilter(SkDrawFilter* filter) { 191 SkDrawFilter* SkProxyCanvas::setDrawFilter(SkDrawFilter* filter) {
192 return fProxy->setDrawFilter(filter); 192 return fProxy->setDrawFilter(filter);
193 } 193 }
OLDNEW
« no previous file with comments | « src/utils/SkPictureUtils.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698