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

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

Issue 1919063002: Image filters: de-nest SkImageFilter::Cache and Cache::Key. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix copyright Created 4 years, 7 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/SkImageFilter.h ('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"
11 #include "SkImageFilterCache.h"
11 #include "SkMallocPixelRef.h" 12 #include "SkMallocPixelRef.h"
12 #include "SkMatrix.h" 13 #include "SkMatrix.h"
13 #include "SkPaint.h" 14 #include "SkPaint.h"
14 #include "SkPath.h" 15 #include "SkPath.h"
15 #include "SkPixelRef.h" 16 #include "SkPixelRef.h"
16 #include "SkPixmap.h" 17 #include "SkPixmap.h"
17 #include "SkShader.h" 18 #include "SkShader.h"
18 #include "SkSurface.h" 19 #include "SkSurface.h"
19 #include "SkXfermode.h" 20 #include "SkXfermode.h"
20 21
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 361
361 void SkBitmapDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, 362 void SkBitmapDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device,
362 int x, int y, const SkPaint& paint) { 363 int x, int y, const SkPaint& paint) {
363 draw.drawSprite(static_cast<SkBitmapDevice*>(device)->fBitmap, x, y, paint); 364 draw.drawSprite(static_cast<SkBitmapDevice*>(device)->fBitmap, x, y, paint);
364 } 365 }
365 366
366 sk_sp<SkSurface> SkBitmapDevice::makeSurface(const SkImageInfo& info, const SkSu rfaceProps& props) { 367 sk_sp<SkSurface> SkBitmapDevice::makeSurface(const SkImageInfo& info, const SkSu rfaceProps& props) {
367 return SkSurface::MakeRaster(info, &props); 368 return SkSurface::MakeRaster(info, &props);
368 } 369 }
369 370
370 SkImageFilter::Cache* SkBitmapDevice::getImageFilterCache() { 371 SkImageFilterCache* SkBitmapDevice::getImageFilterCache() {
371 SkImageFilter::Cache* cache = SkImageFilter::Cache::Get(); 372 SkImageFilterCache* cache = SkImageFilterCache::Get();
372 cache->ref(); 373 cache->ref();
373 return cache; 374 return cache;
374 } 375 }
375 376
376 /////////////////////////////////////////////////////////////////////////////// 377 ///////////////////////////////////////////////////////////////////////////////
377 378
378 bool SkBitmapDevice::onShouldDisableLCD(const SkPaint& paint) const { 379 bool SkBitmapDevice::onShouldDisableLCD(const SkPaint& paint) const {
379 if (kN32_SkColorType != fBitmap.colorType() || 380 if (kN32_SkColorType != fBitmap.colorType() ||
380 paint.getRasterizer() || 381 paint.getRasterizer() ||
381 paint.getPathEffect() || 382 paint.getPathEffect() ||
382 paint.isFakeBoldText() || 383 paint.isFakeBoldText() ||
383 paint.getStyle() != SkPaint::kFill_Style || 384 paint.getStyle() != SkPaint::kFill_Style ||
384 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) 385 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode))
385 { 386 {
386 return true; 387 return true;
387 } 388 }
388 return false; 389 return false;
389 } 390 }
OLDNEW
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698