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

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 1514503004: SkBitmap move (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-10 (Thursday) 17:55:13 EST Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "SkGpuDevice.h" 8 #include "SkGpuDevice.h"
9 9
10 #include "GrBlurUtils.h" 10 #include "GrBlurUtils.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 632 }
633 633
634 #include "SkMaskFilter.h" 634 #include "SkMaskFilter.h"
635 635
636 /////////////////////////////////////////////////////////////////////////////// 636 ///////////////////////////////////////////////////////////////////////////////
637 637
638 static SkBitmap wrap_texture(GrTexture* texture, int width, int height) { 638 static SkBitmap wrap_texture(GrTexture* texture, int width, int height) {
639 SkBitmap result; 639 SkBitmap result;
640 result.setInfo(SkImageInfo::MakeN32Premul(width, height)); 640 result.setInfo(SkImageInfo::MakeN32Premul(width, height));
641 result.setPixelRef(new SkGrPixelRef(result.info(), texture))->unref(); 641 result.setPixelRef(new SkGrPixelRef(result.info(), texture))->unref();
642 return result; 642 return skstd::move(result);
643 } 643 }
644 644
645 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath, 645 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
646 const SkPaint& paint, const SkMatrix* prePathMatrix, 646 const SkPaint& paint, const SkMatrix* prePathMatrix,
647 bool pathIsMutable) { 647 bool pathIsMutable) {
648 if (!origSrcPath.isInverseFillType() && !paint.getPathEffect() && !prePathMa trix) { 648 if (!origSrcPath.isInverseFillType() && !paint.getPathEffect() && !prePathMa trix) {
649 bool isClosed; 649 bool isClosed;
650 SkRect rect; 650 SkRect rect;
651 if (origSrcPath.isRect(&rect, &isClosed) && isClosed) { 651 if (origSrcPath.isRect(&rect, &isClosed) && isClosed) {
652 this->drawRect(draw, rect, paint); 652 this->drawRect(draw, rect, paint);
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1874 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1875 } 1875 }
1876 1876
1877 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1877 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1878 // We always return a transient cache, so it is freed after each 1878 // We always return a transient cache, so it is freed after each
1879 // filter traversal. 1879 // filter traversal.
1880 return SkGpuDevice::NewImageFilterCache(); 1880 return SkGpuDevice::NewImageFilterCache();
1881 } 1881 }
1882 1882
1883 #endif 1883 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698