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

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

Issue 813653003: Fix complexclip3 test on gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@nopos
Patch Set: Created 6 years 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 | « gm/complexclip3.cpp ('k') | no next file » | 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 2012 Google Inc. 2 * Copyright 2012 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 "GrClipMaskManager.h" 8 #include "GrClipMaskManager.h"
9 #include "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 #include "GrAAHairLinePathRenderer.h" 10 #include "GrAAHairLinePathRenderer.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 sampleM, 440 sampleM,
441 GrTextureDomain::MakeTexelDomain(srcMask, srcBound), 441 GrTextureDomain::MakeTexelDomain(srcMask, srcBound),
442 GrTextureDomain::kDecal_Mode, 442 GrTextureDomain::kDecal_Mode,
443 GrTextureParams::kNone_FilterMode))->unref (); 443 GrTextureParams::kNone_FilterMode))->unref ();
444 // The color passed in here does not matter since the coverageSetOpXP won't read it. 444 // The color passed in here does not matter since the coverageSetOpXP won't read it.
445 fClipTarget->drawSimpleRect(drawState, GrColor_WHITE, SkRect::Make(dstBound) ); 445 fClipTarget->drawSimpleRect(drawState, GrColor_WHITE, SkRect::Make(dstBound) );
446 } 446 }
447 447
448 GrTexture* GrClipMaskManager::createTempMask(int width, int height) { 448 GrTexture* GrClipMaskManager::createTempMask(int width, int height) {
449 GrSurfaceDesc desc; 449 GrSurfaceDesc desc;
450 desc.fFlags = kRenderTarget_GrSurfaceFlag|kNoStencil_GrSurfaceFlag; 450 desc.fFlags = kRenderTarget_GrSurfaceFlag;
451 desc.fWidth = width; 451 desc.fWidth = width;
452 desc.fHeight = height; 452 desc.fHeight = height;
453 desc.fConfig = kAlpha_8_GrPixelConfig; 453 desc.fConfig = kAlpha_8_GrPixelConfig;
454 454
455 return this->getContext()->refScratchTexture(desc, GrContext::kApprox_Scratc hTexMatch); 455 return this->getContext()->refScratchTexture(desc, GrContext::kApprox_Scratc hTexMatch);
456 } 456 }
457 457
458 //////////////////////////////////////////////////////////////////////////////// 458 ////////////////////////////////////////////////////////////////////////////////
459 // Return the texture currently in the cache if it exists. Otherwise, return NUL L 459 // Return the texture currently in the cache if it exists. Otherwise, return NUL L
460 GrTexture* GrClipMaskManager::getCachedMaskTexture(int32_t elementsGenID, 460 GrTexture* GrClipMaskManager::getCachedMaskTexture(int32_t elementsGenID,
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 } 1058 }
1059 1059
1060 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu ffer, 1060 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu ffer,
1061 GrStencilSettings* settings) { 1061 GrStencilSettings* settings) {
1062 // TODO: dynamically attach a stencil buffer 1062 // TODO: dynamically attach a stencil buffer
1063 if (stencilBuffer) { 1063 if (stencilBuffer) {
1064 int stencilBits = stencilBuffer->bits(); 1064 int stencilBits = stencilBuffer->bits();
1065 this->adjustStencilParams(settings, fClipMode, stencilBits); 1065 this->adjustStencilParams(settings, fClipMode, stencilBits);
1066 } 1066 }
1067 } 1067 }
OLDNEW
« no previous file with comments | « gm/complexclip3.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698