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

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

Issue 783493002: Change clear() to respect the clip (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/core/SkRecorder.h ('k') | src/core/SkRecords.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 "SkRecorder.h" 8 #include "SkRecorder.h"
9 #include "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 #include "SkPicture.h" 10 #include "SkPicture.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return dst; 111 return dst;
112 } 112 }
113 113
114 // As above, assuming and copying a terminating \0. 114 // As above, assuming and copying a terminating \0.
115 template <> 115 template <>
116 char* SkRecorder::copy(const char* src) { 116 char* SkRecorder::copy(const char* src) {
117 return this->copy(src, strlen(src)+1); 117 return this->copy(src, strlen(src)+1);
118 } 118 }
119 119
120 120
121 void SkRecorder::clear(SkColor color) {
122 APPEND(Clear, color);
123 }
124
125 void SkRecorder::drawPaint(const SkPaint& paint) { 121 void SkRecorder::drawPaint(const SkPaint& paint) {
126 APPEND(DrawPaint, delay_copy(paint)); 122 APPEND(DrawPaint, delay_copy(paint));
127 } 123 }
128 124
129 void SkRecorder::drawPoints(PointMode mode, 125 void SkRecorder::drawPoints(PointMode mode,
130 size_t count, 126 size_t count,
131 const SkPoint pts[], 127 const SkPoint pts[],
132 const SkPaint& paint) { 128 const SkPaint& paint) {
133 APPEND(DrawPoints, delay_copy(paint), mode, SkToUInt(count), this->copy(pts, count)); 129 APPEND(DrawPoints, delay_copy(paint), mode, SkToUInt(count), this->copy(pts, count));
134 } 130 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 APPEND(EndCommentGroup); 357 APPEND(EndCommentGroup);
362 } 358 }
363 359
364 bool SkRecorder::isDrawingToLayer() const { 360 bool SkRecorder::isDrawingToLayer() const {
365 return fSaveLayerCount > 0; 361 return fSaveLayerCount > 0;
366 } 362 }
367 363
368 void SkRecorder::drawData(const void* data, size_t length) { 364 void SkRecorder::drawData(const void* data, size_t length) {
369 APPEND(DrawData, copy((const char*)data), length); 365 APPEND(DrawData, copy((const char*)data), length);
370 } 366 }
OLDNEW
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698