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

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

Issue 2262233002: Make GrTextureStripAtlas flush pending IO on newly acquired texture (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 3 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 | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/effects/GrTextureStripAtlas.h » ('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 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 "GrContext.h" 8 #include "GrContext.h"
9 #include "GrContextPriv.h" 9 #include "GrContextPriv.h"
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 } 587 }
588 588
589 void GrContext::flushSurfaceWrites(GrSurface* surface) { 589 void GrContext::flushSurfaceWrites(GrSurface* surface) {
590 ASSERT_SINGLE_OWNER 590 ASSERT_SINGLE_OWNER
591 RETURN_IF_ABANDONED 591 RETURN_IF_ABANDONED
592 if (surface->surfacePriv().hasPendingWrite()) { 592 if (surface->surfacePriv().hasPendingWrite()) {
593 this->flush(); 593 this->flush();
594 } 594 }
595 } 595 }
596 596
597 void GrContext::flushSurfaceIO(GrSurface* surface) {
598 ASSERT_SINGLE_OWNER
599 RETURN_IF_ABANDONED
600 if (surface->surfacePriv().hasPendingIO()) {
601 this->flush();
602 }
603 }
604
597 //////////////////////////////////////////////////////////////////////////////// 605 ////////////////////////////////////////////////////////////////////////////////
598 int GrContext::getRecommendedSampleCount(GrPixelConfig config, 606 int GrContext::getRecommendedSampleCount(GrPixelConfig config,
599 SkScalar dpi) const { 607 SkScalar dpi) const {
600 ASSERT_SINGLE_OWNER 608 ASSERT_SINGLE_OWNER
601 609
602 if (!this->caps()->isConfigRenderable(config, true)) { 610 if (!this->caps()->isConfigRenderable(config, true)) {
603 return 0; 611 return 0;
604 } 612 }
605 int chosenSampleCount = 0; 613 int chosenSampleCount = 0;
606 if (fGpu->caps()->shaderCaps()->pathRenderingSupport()) { 614 if (fGpu->caps()->shaderCaps()->pathRenderingSupport()) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 ASSERT_SINGLE_OWNER 795 ASSERT_SINGLE_OWNER
788 fResourceCache->setLimits(maxTextures, maxTextureBytes); 796 fResourceCache->setLimits(maxTextures, maxTextureBytes);
789 } 797 }
790 798
791 ////////////////////////////////////////////////////////////////////////////// 799 //////////////////////////////////////////////////////////////////////////////
792 800
793 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { 801 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
794 ASSERT_SINGLE_OWNER 802 ASSERT_SINGLE_OWNER
795 fResourceCache->dumpMemoryStatistics(traceMemoryDump); 803 fResourceCache->dumpMemoryStatistics(traceMemoryDump);
796 } 804 }
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/effects/GrTextureStripAtlas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698