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

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

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « src/c/sk_surface.cpp ('k') | src/core/SkCanvas.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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 const SkPaint& paint) { 353 const SkPaint& paint) {
354 draw.drawVertices(vmode, vertexCount, verts, textures, colors, xmode, 354 draw.drawVertices(vmode, vertexCount, verts, textures, colors, xmode,
355 indices, indexCount, paint); 355 indices, indexCount, paint);
356 } 356 }
357 357
358 void SkBitmapDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, 358 void SkBitmapDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device,
359 int x, int y, const SkPaint& paint) { 359 int x, int y, const SkPaint& paint) {
360 draw.drawSprite(static_cast<SkBitmapDevice*>(device)->fBitmap, x, y, paint); 360 draw.drawSprite(static_cast<SkBitmapDevice*>(device)->fBitmap, x, y, paint);
361 } 361 }
362 362
363 SkSurface* SkBitmapDevice::newSurface(const SkImageInfo& info, const SkSurfacePr ops& props) { 363 sk_sp<SkSurface> SkBitmapDevice::makeSurface(const SkImageInfo& info, const SkSu rfaceProps& props) {
364 return SkSurface::NewRaster(info, &props); 364 return SkSurface::MakeRaster(info, &props);
365 } 365 }
366 366
367 SkImageFilter::Cache* SkBitmapDevice::getImageFilterCache() { 367 SkImageFilter::Cache* SkBitmapDevice::getImageFilterCache() {
368 SkImageFilter::Cache* cache = SkImageFilter::Cache::Get(); 368 SkImageFilter::Cache* cache = SkImageFilter::Cache::Get();
369 cache->ref(); 369 cache->ref();
370 return cache; 370 return cache;
371 } 371 }
372 372
373 /////////////////////////////////////////////////////////////////////////////// 373 ///////////////////////////////////////////////////////////////////////////////
374 374
375 bool SkBitmapDevice::onShouldDisableLCD(const SkPaint& paint) const { 375 bool SkBitmapDevice::onShouldDisableLCD(const SkPaint& paint) const {
376 if (kN32_SkColorType != fBitmap.colorType() || 376 if (kN32_SkColorType != fBitmap.colorType() ||
377 paint.getRasterizer() || 377 paint.getRasterizer() ||
378 paint.getPathEffect() || 378 paint.getPathEffect() ||
379 paint.isFakeBoldText() || 379 paint.isFakeBoldText() ||
380 paint.getStyle() != SkPaint::kFill_Style || 380 paint.getStyle() != SkPaint::kFill_Style ||
381 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) 381 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode))
382 { 382 {
383 return true; 383 return true;
384 } 384 }
385 return false; 385 return false;
386 } 386 }
OLDNEW
« no previous file with comments | « src/c/sk_surface.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698