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

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

Issue 1413973002: Modifications to get 'blaze build -c opt //third_party/skia/HEAD/...' to work. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 2 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/core/SkTaskGroup.h ('k') | src/gpu/gl/GrGLGpu.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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 SkAutoTUnref<GrTexture> tempTexture; 397 SkAutoTUnref<GrTexture> tempTexture;
398 if (GrGpu::kNoDraw_DrawPreference != drawPreference) { 398 if (GrGpu::kNoDraw_DrawPreference != drawPreference) {
399 tempTexture.reset( 399 tempTexture.reset(
400 this->textureProvider()->createApproxTexture(tempDrawInfo.fTempSurfa ceDesc)); 400 this->textureProvider()->createApproxTexture(tempDrawInfo.fTempSurfa ceDesc));
401 if (!tempTexture && GrGpu::kRequireDraw_DrawPreference == drawPreference ) { 401 if (!tempTexture && GrGpu::kRequireDraw_DrawPreference == drawPreference ) {
402 return false; 402 return false;
403 } 403 }
404 } 404 }
405 405
406 // temp buffer for doing sw premul conversion, if needed. 406 // temp buffer for doing sw premul conversion, if needed.
407 #if defined(GOOGLE3)
408 // Stack frame size is limited in GOOGLE3.
409 SkAutoSTMalloc<48 * 48, uint32_t> tmpPixels(0);
410 #else
407 SkAutoSTMalloc<128 * 128, uint32_t> tmpPixels(0); 411 SkAutoSTMalloc<128 * 128, uint32_t> tmpPixels(0);
412 #endif
408 if (tempTexture) { 413 if (tempTexture) {
409 SkAutoTUnref<const GrFragmentProcessor> fp; 414 SkAutoTUnref<const GrFragmentProcessor> fp;
410 SkMatrix textureMatrix; 415 SkMatrix textureMatrix;
411 textureMatrix.setIDiv(tempTexture->width(), tempTexture->height()); 416 textureMatrix.setIDiv(tempTexture->width(), tempTexture->height());
412 GrPaint paint; 417 GrPaint paint;
413 if (applyPremulToSrc) { 418 if (applyPremulToSrc) {
414 fp.reset(this->createUPMToPMEffect(tempTexture, tempDrawInfo.fSwapRA ndB, 419 fp.reset(this->createUPMToPMEffect(tempTexture, tempDrawInfo.fSwapRA ndB,
415 textureMatrix)); 420 textureMatrix));
416 // If premultiplying was the only reason for the draw, fall back to a straight write. 421 // If premultiplying was the only reason for the draw, fall back to a straight write.
417 if (!fp) { 422 if (!fp) {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 796
792 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) { 797 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) {
793 fResourceCache->setLimits(maxTextures, maxTextureBytes); 798 fResourceCache->setLimits(maxTextures, maxTextureBytes);
794 } 799 }
795 800
796 ////////////////////////////////////////////////////////////////////////////// 801 //////////////////////////////////////////////////////////////////////////////
797 802
798 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { 803 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
799 fResourceCache->dumpMemoryStatistics(traceMemoryDump); 804 fResourceCache->dumpMemoryStatistics(traceMemoryDump);
800 } 805 }
OLDNEW
« no previous file with comments | « src/core/SkTaskGroup.h ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698