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

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

Issue 1118723003: Fix for texture allocation failure in 'preAbandonGpuContext' mode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 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 "GrContext.h" 10 #include "GrContext.h"
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 1726
1727 SkAutoLockPixels alp(src, !src.getTexture()); 1727 SkAutoLockPixels alp(src, !src.getTexture());
1728 if (!src.getTexture() && !src.readyToDraw()) { 1728 if (!src.getTexture() && !src.readyToDraw()) {
1729 return false; 1729 return false;
1730 } 1730 }
1731 1731
1732 GrTexture* texture; 1732 GrTexture* texture;
1733 // We assume here that the filter will not attempt to tile the src. Otherwis e, this cache lookup 1733 // We assume here that the filter will not attempt to tile the src. Otherwis e, this cache lookup
1734 // must be pushed upstack. 1734 // must be pushed upstack.
1735 AutoBitmapTexture abt(fContext, src, NULL, &texture); 1735 AutoBitmapTexture abt(fContext, src, NULL, &texture);
1736 if (!texture) {
1737 return false;
1738 }
1736 1739
1737 return this->filterTexture(fContext, texture, src.width(), src.height(), 1740 return this->filterTexture(fContext, texture, src.width(), src.height(),
1738 filter, ctx, result, offset); 1741 filter, ctx, result, offset);
1739 } 1742 }
1740 1743
1741 /////////////////////////////////////////////////////////////////////////////// 1744 ///////////////////////////////////////////////////////////////////////////////
1742 1745
1743 // must be in SkCanvas::VertexMode order 1746 // must be in SkCanvas::VertexMode order
1744 static const GrPrimitiveType gVertexMode2PrimitiveType[] = { 1747 static const GrPrimitiveType gVertexMode2PrimitiveType[] = {
1745 kTriangles_GrPrimitiveType, 1748 kTriangles_GrPrimitiveType,
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 #endif 2041 #endif
2039 } 2042 }
2040 2043
2041 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 2044 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
2042 // We always return a transient cache, so it is freed after each 2045 // We always return a transient cache, so it is freed after each
2043 // filter traversal. 2046 // filter traversal.
2044 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 2047 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
2045 } 2048 }
2046 2049
2047 #endif 2050 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698