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

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

Issue 2153173002: remove unused CreateInfo flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/core/SkDevice.h ('k') | src/pdf/SkPDFDevice.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 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkCanvasPriv.h" 10 #include "SkCanvasPriv.h"
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 1279
1280 SkImageInfo info = make_layer_info(device->imageInfo(), ir.width(), ir.heigh t(), isOpaque, 1280 SkImageInfo info = make_layer_info(device->imageInfo(), ir.width(), ir.heigh t(), isOpaque,
1281 paint); 1281 paint);
1282 1282
1283 bool forceSpriteOnRestore = false; 1283 bool forceSpriteOnRestore = false;
1284 { 1284 {
1285 const bool preserveLCDText = kOpaque_SkAlphaType == info.alphaType() || 1285 const bool preserveLCDText = kOpaque_SkAlphaType == info.alphaType() ||
1286 (saveLayerFlags & kPreserveLCDText_SaveLaye rFlag); 1286 (saveLayerFlags & kPreserveLCDText_SaveLaye rFlag);
1287 const SkBaseDevice::TileUsage usage = SkBaseDevice::kNever_TileUsage; 1287 const SkBaseDevice::TileUsage usage = SkBaseDevice::kNever_TileUsage;
1288 const SkBaseDevice::CreateInfo createInfo = SkBaseDevice::CreateInfo(inf o, usage, geo, 1288 const SkBaseDevice::CreateInfo createInfo = SkBaseDevice::CreateInfo(inf o, usage, geo,
1289 pres erveLCDText, false); 1289 pre serveLCDText);
1290 SkBaseDevice* newDev = device->onCreateDevice(createInfo, paint); 1290 SkBaseDevice* newDev = device->onCreateDevice(createInfo, paint);
1291 if (nullptr == newDev) { 1291 if (nullptr == newDev) {
1292 // If onCreateDevice didn't succeed, try raster (e.g. PDF couldn't h andle the paint) 1292 // If onCreateDevice didn't succeed, try raster (e.g. PDF couldn't h andle the paint)
1293 const SkSurfaceProps surfaceProps(fProps.flags(), createInfo.fPixelG eometry); 1293 const SkSurfaceProps surfaceProps(fProps.flags(), createInfo.fPixelG eometry);
1294 newDev = SkBitmapDevice::Create(createInfo.fInfo, surfaceProps); 1294 newDev = SkBitmapDevice::Create(createInfo.fInfo, surfaceProps);
1295 if (nullptr == newDev) { 1295 if (nullptr == newDev) {
1296 SkErrorInternals::SetError(kInternalError_SkError, 1296 SkErrorInternals::SetError(kInternalError_SkError,
1297 "Unable to create device for layer.") ; 1297 "Unable to create device for layer.") ;
1298 return; 1298 return;
1299 } 1299 }
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 3134
3135 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 3135 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
3136 fCanvas->restoreToCount(fSaveCount); 3136 fCanvas->restoreToCount(fSaveCount);
3137 } 3137 }
3138 3138
3139 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API 3139 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API
3140 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p rops) { 3140 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p rops) {
3141 return this->makeSurface(info, props).release(); 3141 return this->makeSurface(info, props).release();
3142 } 3142 }
3143 #endif 3143 #endif
OLDNEW
« no previous file with comments | « include/core/SkDevice.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698