| 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 #include "GrContext.h" | 8 #include "GrContext.h" | 
| 9 #include "GrContextOptions.h" | 9 #include "GrContextOptions.h" | 
| 10 #include "GrDrawingManager.h" | 10 #include "GrDrawingManager.h" | 
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 536     } | 536     } | 
| 537 | 537 | 
| 538     SkSurfaceProps props(SkSurfaceProps::kGammaCorrect_Flag, | 538     SkSurfaceProps props(SkSurfaceProps::kGammaCorrect_Flag, | 
| 539                          SkSurfaceProps::kLegacyFontHost_InitType); | 539                          SkSurfaceProps::kLegacyFontHost_InitType); | 
| 540     sk_sp<GrDrawContext> drawContext(this->drawContext(sk_ref_sp(dst), &props)); | 540     sk_sp<GrDrawContext> drawContext(this->drawContext(sk_ref_sp(dst), &props)); | 
| 541     if (!drawContext) { | 541     if (!drawContext) { | 
| 542         return false; | 542         return false; | 
| 543     } | 543     } | 
| 544 | 544 | 
| 545     GrPaint paint; | 545     GrPaint paint; | 
| 546     paint.addColorTextureProcessor(src, GrCoordTransform::MakeDivByTextureWHMatr
     ix(src)); | 546     paint.addColorTextureProcessor(src, nullptr, GrCoordTransform::MakeDivByText
     ureWHMatrix(src)); | 
| 547     if (!SkScalarNearlyEqual(gamma, 1.0f)) { | 547     if (!SkScalarNearlyEqual(gamma, 1.0f)) { | 
| 548         paint.addColorFragmentProcessor(GrGammaEffect::Make(gamma)); | 548         paint.addColorFragmentProcessor(GrGammaEffect::Make(gamma)); | 
| 549     } | 549     } | 
| 550     paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); | 550     paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); | 
| 551     paint.setGammaCorrect(true); | 551     paint.setGammaCorrect(true); | 
| 552 | 552 | 
| 553     SkRect rect; | 553     SkRect rect; | 
| 554     src->getBoundsRect(&rect); | 554     src->getBoundsRect(&rect); | 
| 555     drawContext->drawRect(GrNoClip(), paint, SkMatrix::I(), rect); | 555     drawContext->drawRect(GrNoClip(), paint, SkMatrix::I(), rect); | 
| 556 | 556 | 
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 758     ASSERT_SINGLE_OWNER | 758     ASSERT_SINGLE_OWNER | 
| 759     fResourceCache->setLimits(maxTextures, maxTextureBytes); | 759     fResourceCache->setLimits(maxTextures, maxTextureBytes); | 
| 760 } | 760 } | 
| 761 | 761 | 
| 762 ////////////////////////////////////////////////////////////////////////////// | 762 ////////////////////////////////////////////////////////////////////////////// | 
| 763 | 763 | 
| 764 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 764 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 
| 765     ASSERT_SINGLE_OWNER | 765     ASSERT_SINGLE_OWNER | 
| 766     fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 766     fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 
| 767 } | 767 } | 
| OLD | NEW | 
|---|