| OLD | NEW |
| 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 /* | 8 /* |
| 9 * Code for the "gm" (Golden Master) rendering comparison tool. | 9 * Code for the "gm" (Golden Master) rendering comparison tool. |
| 10 * | 10 * |
| (...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 desc.fWidth = gm->getISize().width(); | 1767 desc.fWidth = gm->getISize().width(); |
| 1768 desc.fHeight = gm->getISize().height(); | 1768 desc.fHeight = gm->getISize().height(); |
| 1769 desc.fSampleCnt = config.fSampleCnt; | 1769 desc.fSampleCnt = config.fSampleCnt; |
| 1770 auGpuTarget.reset(gr->createUncachedTexture(desc, NULL, 0)); | 1770 auGpuTarget.reset(gr->createUncachedTexture(desc, NULL, 0)); |
| 1771 if (NULL != auGpuTarget) { | 1771 if (NULL != auGpuTarget) { |
| 1772 gpuTarget = auGpuTarget; | 1772 gpuTarget = auGpuTarget; |
| 1773 grSuccess = true; | 1773 grSuccess = true; |
| 1774 // Set the user specified cache limits if non-default. | 1774 // Set the user specified cache limits if non-default. |
| 1775 size_t bytes; | 1775 size_t bytes; |
| 1776 int count; | 1776 int count; |
| 1777 gr->getTextureCacheLimits(&count, &bytes); | 1777 gr->getResourceCacheLimits(&count, &bytes); |
| 1778 if (DEFAULT_CACHE_VALUE != gGpuCacheSizeBytes) { | 1778 if (DEFAULT_CACHE_VALUE != gGpuCacheSizeBytes) { |
| 1779 bytes = static_cast<size_t>(gGpuCacheSizeBytes); | 1779 bytes = static_cast<size_t>(gGpuCacheSizeBytes); |
| 1780 } | 1780 } |
| 1781 if (DEFAULT_CACHE_VALUE != gGpuCacheSizeCount) { | 1781 if (DEFAULT_CACHE_VALUE != gGpuCacheSizeCount) { |
| 1782 count = gGpuCacheSizeCount; | 1782 count = gGpuCacheSizeCount; |
| 1783 } | 1783 } |
| 1784 gr->setTextureCacheLimits(count, bytes); | 1784 gr->setResourceCacheLimits(count, bytes); |
| 1785 } | 1785 } |
| 1786 } | 1786 } |
| 1787 if (!grSuccess) { | 1787 if (!grSuccess) { |
| 1788 errorsForThisConfig.add(kNoGpuContext_ErrorType); | 1788 errorsForThisConfig.add(kNoGpuContext_ErrorType); |
| 1789 } | 1789 } |
| 1790 } | 1790 } |
| 1791 #endif | 1791 #endif |
| 1792 | 1792 |
| 1793 SkBitmap comparisonBitmap; | 1793 SkBitmap comparisonBitmap; |
| 1794 | 1794 |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2455 if (FLAGS_forceBWtext) { | 2455 if (FLAGS_forceBWtext) { |
| 2456 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2456 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
| 2457 } | 2457 } |
| 2458 } | 2458 } |
| 2459 | 2459 |
| 2460 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2460 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 2461 int main(int argc, char * const argv[]) { | 2461 int main(int argc, char * const argv[]) { |
| 2462 return tool_main(argc, (char**) argv); | 2462 return tool_main(argc, (char**) argv); |
| 2463 } | 2463 } |
| 2464 #endif | 2464 #endif |
| OLD | NEW |