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

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

Issue 1032873002: Add mechanism to proactively purge old resources in GrResourceCache. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment Created 5 years, 8 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/gpu/GrGpuResource.h ('k') | src/gpu/GrGpuResource.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 void GrContext::flush(int flagsBitfield) { 1467 void GrContext::flush(int flagsBitfield) {
1468 if (NULL == fDrawBuffer) { 1468 if (NULL == fDrawBuffer) {
1469 return; 1469 return;
1470 } 1470 }
1471 1471
1472 if (kDiscard_FlushBit & flagsBitfield) { 1472 if (kDiscard_FlushBit & flagsBitfield) {
1473 fDrawBuffer->reset(); 1473 fDrawBuffer->reset();
1474 } else { 1474 } else {
1475 fDrawBuffer->flush(); 1475 fDrawBuffer->flush();
1476 } 1476 }
1477 fResourceCache->notifyFlushOccurred();
1477 fFlushToReduceCacheSize = false; 1478 fFlushToReduceCacheSize = false;
1478 } 1479 }
1479 1480
1480 bool sw_convert_to_premul(GrPixelConfig srcConfig, int width, int height, size_t inRowBytes, 1481 bool sw_convert_to_premul(GrPixelConfig srcConfig, int width, int height, size_t inRowBytes,
1481 const void* inPixels, size_t outRowBytes, void* outPix els) { 1482 const void* inPixels, size_t outRowBytes, void* outPix els) {
1482 SkSrcPixelInfo srcPI; 1483 SkSrcPixelInfo srcPI;
1483 if (!GrPixelConfig2ColorAndProfileType(srcConfig, &srcPI.fColorType, NULL)) { 1484 if (!GrPixelConfig2ColorAndProfileType(srcConfig, &srcPI.fColorType, NULL)) {
1484 return false; 1485 return false;
1485 } 1486 }
1486 srcPI.fAlphaType = kUnpremul_SkAlphaType; 1487 srcPI.fAlphaType = kUnpremul_SkAlphaType;
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 } 2014 }
2014 } 2015 }
2015 2016
2016 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { 2017 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
2017 fGpu->removeGpuTraceMarker(marker); 2018 fGpu->removeGpuTraceMarker(marker);
2018 if (fDrawBuffer) { 2019 if (fDrawBuffer) {
2019 fDrawBuffer->removeGpuTraceMarker(marker); 2020 fDrawBuffer->removeGpuTraceMarker(marker);
2020 } 2021 }
2021 } 2022 }
2022 2023
OLDNEW
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698