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

Side by Side Diff: src/core/SkDevice.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/SkCanvas.cpp ('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 2011 Google Inc. 2 * Copyright 2011 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 "SkDevice.h" 8 #include "SkDevice.h"
9 #include "SkDeviceProperties.h" 9 #include "SkDeviceProperties.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // 83 //
84 fLeakyProperties->setPixelGeometry(CreateInfo::AdjustGeometry(this->imageInf o(), 84 fLeakyProperties->setPixelGeometry(CreateInfo::AdjustGeometry(this->imageInf o(),
85 kGeneral_Usage , 85 kGeneral_Usage ,
86 geo)); 86 geo));
87 } 87 }
88 88
89 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&, const SkSurfaceProps&) { return NULL; } 89 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&, const SkSurfaceProps&) { return NULL; }
90 90
91 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } 91 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; }
92 92
93 // DEPRECATED : remove when chrome subclass have been updated to not override cl ear()
94 void SkBaseDevice::clear(SkColor color) {
95 SkFAIL("SkDevice::clear() should not be called");
96 }
97
93 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, 98 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
94 const SkRRect& inner, const SkPaint& paint) { 99 const SkRRect& inner, const SkPaint& paint) {
95 SkPath path; 100 SkPath path;
96 path.addRRect(outer); 101 path.addRRect(outer);
97 path.addRRect(inner); 102 path.addRRect(inner);
98 path.setFillType(SkPath::kEvenOdd_FillType); 103 path.setFillType(SkPath::kEvenOdd_FillType);
99 104
100 const SkMatrix* preMatrix = NULL; 105 const SkMatrix* preMatrix = NULL;
101 const bool pathIsMutable = true; 106 const bool pathIsMutable = true;
102 this->drawPath(draw, path, paint, preMatrix, pathIsMutable); 107 this->drawPath(draw, path, paint, preMatrix, pathIsMutable);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() 227 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry()
223 || this->onShouldDisableLCD(paint)) { 228 || this->onShouldDisableLCD(paint)) {
224 229
225 flags &= ~SkPaint::kLCDRenderText_Flag; 230 flags &= ~SkPaint::kLCDRenderText_Flag;
226 flags |= SkPaint::kGenA8FromLCD_Flag; 231 flags |= SkPaint::kGenA8FromLCD_Flag;
227 } 232 }
228 233
229 return flags; 234 return flags;
230 } 235 }
231 236
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698