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

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

Issue 68203018: Revert "Revert "switch GatherPixelRefs to use SkBaseDevice instead of SkBitmapDevice"" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/gpu/SkGpuDevice.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 "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 fBitmap.lockPixels(); 70 fBitmap.lockPixels();
71 } 71 }
72 } 72 }
73 73
74 void SkBitmapDevice::unlockPixels() { 74 void SkBitmapDevice::unlockPixels() {
75 if (fBitmap.lockPixelsAreWritable()) { 75 if (fBitmap.lockPixelsAreWritable()) {
76 fBitmap.unlockPixels(); 76 fBitmap.unlockPixels();
77 } 77 }
78 } 78 }
79 79
80 void SkBitmapDevice::getGlobalBounds(SkIRect* bounds) const {
81 if (NULL != bounds) {
82 const SkIPoint& origin = this->getOrigin();
83 bounds->setXYWH(origin.x(), origin.y(),
84 fBitmap.width(), fBitmap.height());
85 }
86 }
87
88 void SkBitmapDevice::clear(SkColor color) { 80 void SkBitmapDevice::clear(SkColor color) {
89 fBitmap.eraseColor(color); 81 fBitmap.eraseColor(color);
90 } 82 }
91 83
92 const SkBitmap& SkBitmapDevice::onAccessBitmap() { 84 const SkBitmap& SkBitmapDevice::onAccessBitmap() {
93 return fBitmap; 85 return fBitmap;
94 } 86 }
95 87
96 bool SkBitmapDevice::canHandleImageFilter(SkImageFilter*) { 88 bool SkBitmapDevice::canHandleImageFilter(SkImageFilter*) {
97 return false; 89 return false;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 paint.getStyle() != SkPaint::kFill_Style || 389 paint.getStyle() != SkPaint::kFill_Style ||
398 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { 390 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) {
399 // turn off lcd 391 // turn off lcd
400 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; 392 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
401 flags->fHinting = paint.getHinting(); 393 flags->fHinting = paint.getHinting();
402 return true; 394 return true;
403 } 395 }
404 // we're cool with the paint as is 396 // we're cool with the paint as is
405 return false; 397 return false;
406 } 398 }
OLDNEW
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698