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

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

Issue 1191943002: Add useDFT field to SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 5 years, 6 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/gpu/GrDrawContext.h ('k') | src/core/SkDeviceProperties.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 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 void SkBitmapDevice::replaceBitmapBackendForRasterSurface(const SkBitmap& bm) { 112 void SkBitmapDevice::replaceBitmapBackendForRasterSurface(const SkBitmap& bm) {
113 SkASSERT(bm.width() == fBitmap.width()); 113 SkASSERT(bm.width() == fBitmap.width());
114 SkASSERT(bm.height() == fBitmap.height()); 114 SkASSERT(bm.height() == fBitmap.height());
115 fBitmap = bm; // intent is to use bm's pixelRef (and rowbytes/config) 115 fBitmap = bm; // intent is to use bm's pixelRef (and rowbytes/config)
116 fBitmap.lockPixels(); 116 fBitmap.lockPixels();
117 } 117 }
118 118
119 SkBaseDevice* SkBitmapDevice::onCreateDevice(const CreateInfo& cinfo, const SkPa int*) { 119 SkBaseDevice* SkBitmapDevice::onCreateDevice(const CreateInfo& cinfo, const SkPa int*) {
120 SkDeviceProperties leaky(cinfo.fPixelGeometry); 120 const SkDeviceProperties leaky(cinfo.fPixelGeometry);
121 return SkBitmapDevice::Create(cinfo.fInfo, &leaky); 121 return SkBitmapDevice::Create(cinfo.fInfo, &leaky);
122 } 122 }
123 123
124 const SkBitmap& SkBitmapDevice::onAccessBitmap() { 124 const SkBitmap& SkBitmapDevice::onAccessBitmap() {
125 return fBitmap; 125 return fBitmap;
126 } 126 }
127 127
128 bool SkBitmapDevice::onAccessPixels(SkPixmap* pmap) { 128 bool SkBitmapDevice::onAccessPixels(SkPixmap* pmap) {
129 if (fBitmap.lockPixelsAreWritable() && this->onPeekPixels(pmap)) { 129 if (fBitmap.lockPixelsAreWritable() && this->onPeekPixels(pmap)) {
130 fBitmap.notifyPixelsChanged(); 130 fBitmap.notifyPixelsChanged();
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 paint.getRasterizer() || 375 paint.getRasterizer() ||
376 paint.getPathEffect() || 376 paint.getPathEffect() ||
377 paint.isFakeBoldText() || 377 paint.isFakeBoldText() ||
378 paint.getStyle() != SkPaint::kFill_Style || 378 paint.getStyle() != SkPaint::kFill_Style ||
379 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) 379 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode))
380 { 380 {
381 return true; 381 return true;
382 } 382 }
383 return false; 383 return false;
384 } 384 }
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/core/SkDeviceProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698