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

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

Issue 1151603005: Revert of Store context options on caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@onecaps
Patch Set: Created 5 years, 7 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/gpu/GrContextFactory.cpp ('k') | src/gpu/GrGpu.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 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 "GrDrawTarget.h" 9 #include "GrDrawTarget.h"
10 10
11 #include "GrBatch.h" 11 #include "GrBatch.h"
12 #include "GrCaps.h" 12 #include "GrCaps.h"
13 #include "GrContext.h" 13 #include "GrContext.h"
14 #include "GrContextOptions.h"
15 #include "GrPath.h" 14 #include "GrPath.h"
16 #include "GrPipeline.h" 15 #include "GrPipeline.h"
17 #include "GrMemoryPool.h" 16 #include "GrMemoryPool.h"
18 #include "GrRectBatch.h" 17 #include "GrRectBatch.h"
19 #include "GrRenderTarget.h" 18 #include "GrRenderTarget.h"
20 #include "GrRenderTargetPriv.h" 19 #include "GrRenderTargetPriv.h"
21 #include "GrSurfacePriv.h" 20 #include "GrSurfacePriv.h"
22 #include "GrTemplates.h" 21 #include "GrTemplates.h"
23 #include "GrTexture.h" 22 #include "GrTexture.h"
24 #include "GrVertexBuffer.h" 23 #include "GrVertexBuffer.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 61 }
63 62
64 SkIRect copyRect; 63 SkIRect copyRect;
65 pipelineBuilder.clip().getConservativeBounds(rt, &copyRect); 64 pipelineBuilder.clip().getConservativeBounds(rt, &copyRect);
66 65
67 if (drawBounds) { 66 if (drawBounds) {
68 SkIRect drawIBounds; 67 SkIRect drawIBounds;
69 drawBounds->roundOut(&drawIBounds); 68 drawBounds->roundOut(&drawIBounds);
70 if (!copyRect.intersect(drawIBounds)) { 69 if (!copyRect.intersect(drawIBounds)) {
71 #ifdef SK_DEBUG 70 #ifdef SK_DEBUG
72 GrCapsDebugf(fCaps, "Missed an early reject. " 71 GrContextDebugf(fContext, "Missed an early reject. "
73 "Bailing on draw from setupDstReadIfNecessary.\n"); 72 "Bailing on draw from setupDstReadIfNecess ary.\n");
74 #endif 73 #endif
75 return false; 74 return false;
76 } 75 }
77 } else { 76 } else {
78 #ifdef SK_DEBUG 77 #ifdef SK_DEBUG
79 //SkDebugf("No dev bounds when dst copy is made.\n"); 78 //SkDebugf("No dev bounds when dst copy is made.\n");
80 #endif 79 #endif
81 } 80 }
82 81
83 // MSAA consideration: When there is support for reading MSAA samples in the shader we could 82 // MSAA consideration: When there is support for reading MSAA samples in the shader we could
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 fFloatPrecisions[s][p].fBits); 591 fFloatPrecisions[s][p].fBits);
593 } 592 }
594 } 593 }
595 } 594 }
596 595
597 return r; 596 return r;
598 } 597 }
599 598
600 /////////////////////////////////////////////////////////////////////////////// 599 ///////////////////////////////////////////////////////////////////////////////
601 600
602 GrCaps::GrCaps(const GrContextOptions& options) { 601 GrCaps::GrCaps() {
603 fMipMapSupport = false; 602 fMipMapSupport = false;
604 fNPOTTextureTileSupport = false; 603 fNPOTTextureTileSupport = false;
605 fTwoSidedStencilSupport = false; 604 fTwoSidedStencilSupport = false;
606 fStencilWrapOpsSupport = false; 605 fStencilWrapOpsSupport = false;
607 fDiscardRenderTargetSupport = false; 606 fDiscardRenderTargetSupport = false;
608 fReuseScratchTextures = true; 607 fReuseScratchTextures = true;
609 fGpuTracingSupport = false; 608 fGpuTracingSupport = false;
610 fCompressedTexSubImageSupport = false; 609 fCompressedTexSubImageSupport = false;
611 fOversizedStencilSupport = false; 610 fOversizedStencilSupport = false;
612 fTextureBarrierSupport = false; 611 fTextureBarrierSupport = false;
613 612
614 fUseDrawInsteadOfClear = false; 613 fUseDrawInsteadOfClear = false;
615 614
616 fBlendEquationSupport = kBasic_BlendEquationSupport; 615 fBlendEquationSupport = kBasic_BlendEquationSupport;
617 fMapBufferFlags = kNone_MapFlags; 616 fMapBufferFlags = kNone_MapFlags;
618 617
619 fMaxRenderTargetSize = 0; 618 fMaxRenderTargetSize = 0;
620 fMaxTextureSize = 0; 619 fMaxTextureSize = 0;
621 fMaxSampleCount = 0; 620 fMaxSampleCount = 0;
622 621
623 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 622 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
624 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); 623 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
625
626 fSupressPrints = options.fSuppressPrints;
627 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
628 } 624 }
629 625
630 static SkString map_flags_to_string(uint32_t flags) { 626 static SkString map_flags_to_string(uint32_t flags) {
631 SkString str; 627 SkString str;
632 if (GrCaps::kNone_MapFlags == flags) { 628 if (GrCaps::kNone_MapFlags == flags) {
633 str = "none"; 629 str = "none";
634 } else { 630 } else {
635 SkASSERT(GrCaps::kCanMap_MapFlag & flags); 631 SkASSERT(GrCaps::kCanMap_MapFlag & flags);
636 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag); 632 SkDEBUGCODE(flags &= ~GrCaps::kCanMap_MapFlag);
637 str = "can_map"; 633 str = "can_map";
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp, 738 GrPipelineBuilder::AutoRestoreFragmentProcessors* a rfp,
743 GrPipelineBuilder::AutoRestoreStencil* ars, 739 GrPipelineBuilder::AutoRestoreStencil* ars,
744 GrScissorState* scissorState, 740 GrScissorState* scissorState,
745 const SkRect* devBounds) { 741 const SkRect* devBounds) {
746 return fClipMaskManager.setupClipping(pipelineBuilder, 742 return fClipMaskManager.setupClipping(pipelineBuilder,
747 arfp, 743 arfp,
748 ars, 744 ars,
749 scissorState, 745 scissorState,
750 devBounds); 746 devBounds);
751 } 747 }
OLDNEW
« no previous file with comments | « src/gpu/GrContextFactory.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698