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

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

Issue 778563002: Revert "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
121 void SkRecorder::drawPaint(const SkPaint& paint) { 125 void SkRecorder::drawPaint(const SkPaint& paint) {
122 APPEND(DrawPaint, delay_copy(paint)); 126 APPEND(DrawPaint, delay_copy(paint));
123 } 127 }
124 128
125 void SkRecorder::drawPoints(PointMode mode, 129 void SkRecorder::drawPoints(PointMode mode,
126 size_t count, 130 size_t count,
127 const SkPoint pts[], 131 const SkPoint pts[],
128 const SkPaint& paint) { 132 const SkPaint& paint) {
129 APPEND(DrawPoints, delay_copy(paint), mode, SkToUInt(count), this->copy(pts, count)); 133 APPEND(DrawPoints, delay_copy(paint), mode, SkToUInt(count), this->copy(pts, count));
130 } 134 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 APPEND(EndCommentGroup); 361 APPEND(EndCommentGroup);
358 } 362 }
359 363
360 bool SkRecorder::isDrawingToLayer() const { 364 bool SkRecorder::isDrawingToLayer() const {
361 return fSaveLayerCount > 0; 365 return fSaveLayerCount > 0;
362 } 366 }
363 367
364 void SkRecorder::drawData(const void* data, size_t length) { 368 void SkRecorder::drawData(const void* data, size_t length) {
365 APPEND(DrawData, copy((const char*)data), length); 369 APPEND(DrawData, copy((const char*)data), length);
366 } 370 }
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