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

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

Issue 58933007: 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
80 void SkBitmapDevice::clear(SkColor color) { 88 void SkBitmapDevice::clear(SkColor color) {
81 fBitmap.eraseColor(color); 89 fBitmap.eraseColor(color);
82 } 90 }
83 91
84 const SkBitmap& SkBitmapDevice::onAccessBitmap() { 92 const SkBitmap& SkBitmapDevice::onAccessBitmap() {
85 return fBitmap; 93 return fBitmap;
86 } 94 }
87 95
88 bool SkBitmapDevice::canHandleImageFilter(SkImageFilter*) { 96 bool SkBitmapDevice::canHandleImageFilter(SkImageFilter*) {
89 return false; 97 return false;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 paint.getStyle() != SkPaint::kFill_Style || 405 paint.getStyle() != SkPaint::kFill_Style ||
398 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { 406 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) {
399 // turn off lcd 407 // turn off lcd
400 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; 408 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
401 flags->fHinting = paint.getHinting(); 409 flags->fHinting = paint.getHinting();
402 return true; 410 return true;
403 } 411 }
404 // we're cool with the paint as is 412 // we're cool with the paint as is
405 return false; 413 return false;
406 } 414 }
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