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

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

Issue 354133002: change gpudevice and pdfdevice to inherit from basedevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: pdfdevice needs to override newSurface Created 6 years, 5 months 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/pdf/SkPDFDevice.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 void SkBitmapDevice::clear(SkColor color) { 127 void SkBitmapDevice::clear(SkColor color) {
128 fBitmap.eraseColor(color); 128 fBitmap.eraseColor(color);
129 } 129 }
130 130
131 const SkBitmap& SkBitmapDevice::onAccessBitmap() { 131 const SkBitmap& SkBitmapDevice::onAccessBitmap() {
132 return fBitmap; 132 return fBitmap;
133 } 133 }
134 134
135 bool SkBitmapDevice::canHandleImageFilter(const SkImageFilter*) {
136 return false;
137 }
138
139 bool SkBitmapDevice::filterImage(const SkImageFilter* filter, const SkBitmap& sr c,
140 const SkImageFilter::Context& ctx, SkBitmap* re sult,
141 SkIPoint* offset) {
142 return false;
143 }
144
145 bool SkBitmapDevice::allowImageFilter(const SkImageFilter*) {
146 return true;
147 }
148
149 void* SkBitmapDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) { 135 void* SkBitmapDevice::onAccessPixels(SkImageInfo* info, size_t* rowBytes) {
150 if (fBitmap.getPixels()) { 136 if (fBitmap.getPixels()) {
151 *info = fBitmap.info(); 137 *info = fBitmap.info();
152 *rowBytes = fBitmap.rowBytes(); 138 *rowBytes = fBitmap.rowBytes();
153 return fBitmap.getPixels(); 139 return fBitmap.getPixels();
154 } 140 }
155 return NULL; 141 return NULL;
156 } 142 }
157 143
158 static void rect_memcpy(void* dst, size_t dstRB, const void* src, size_t srcRB, size_t bytesPerRow, 144 static void rect_memcpy(void* dst, size_t dstRB, const void* src, size_t srcRB, size_t bytesPerRow,
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 paint.getStyle() != SkPaint::kFill_Style || 454 paint.getStyle() != SkPaint::kFill_Style ||
469 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { 455 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) {
470 // turn off lcd 456 // turn off lcd
471 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; 457 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
472 flags->fHinting = paint.getHinting(); 458 flags->fHinting = paint.getHinting();
473 return true; 459 return true;
474 } 460 }
475 // we're cool with the paint as is 461 // we're cool with the paint as is
476 return false; 462 return false;
477 } 463 }
OLDNEW
« no previous file with comments | « include/pdf/SkPDFDevice.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698