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

Side by Side Diff: src/core/SkBitmapDevice.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 | « include/utils/SkNWayCanvas.h ('k') | src/core/SkCanvas.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 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkConfig8888.h" 9 #include "SkConfig8888.h"
10 #include "SkDeviceProperties.h" 10 #include "SkDeviceProperties.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 fBitmap.lockPixels(); 120 fBitmap.lockPixels();
121 } 121 }
122 } 122 }
123 123
124 void SkBitmapDevice::unlockPixels() { 124 void SkBitmapDevice::unlockPixels() {
125 if (fBitmap.lockPixelsAreWritable()) { 125 if (fBitmap.lockPixelsAreWritable()) {
126 fBitmap.unlockPixels(); 126 fBitmap.unlockPixels();
127 } 127 }
128 } 128 }
129 129
130 void SkBitmapDevice::clear(SkColor color) {
131 fBitmap.eraseColor(color);
132 }
133
130 const SkBitmap& SkBitmapDevice::onAccessBitmap() { 134 const SkBitmap& SkBitmapDevice::onAccessBitmap() {
131 return fBitmap; 135 return fBitmap;
132 } 136 }
133 137
134 void* SkBitmapDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) { 138 void* SkBitmapDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) {
135 if (fBitmap.getPixels()) { 139 if (fBitmap.getPixels()) {
136 *info = fBitmap.info(); 140 *info = fBitmap.info();
137 *rowBytes = fBitmap.rowBytes(); 141 *rowBytes = fBitmap.rowBytes();
138 return fBitmap.getPixels(); 142 return fBitmap.getPixels();
139 } 143 }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 paint.getRasterizer() || 387 paint.getRasterizer() ||
384 paint.getPathEffect() || 388 paint.getPathEffect() ||
385 paint.isFakeBoldText() || 389 paint.isFakeBoldText() ||
386 paint.getStyle() != SkPaint::kFill_Style || 390 paint.getStyle() != SkPaint::kFill_Style ||
387 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) 391 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode))
388 { 392 {
389 return true; 393 return true;
390 } 394 }
391 return false; 395 return false;
392 } 396 }
OLDNEW
« no previous file with comments | « include/utils/SkNWayCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698