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

Side by Side Diff: src/gpu/GrRenderTargetPriv.h

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month 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/GrRenderTarget.cpp ('k') | src/gpu/GrStencilSettings.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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #ifndef GrRenderTargetPriv_DEFINED 8 #ifndef GrRenderTargetPriv_DEFINED
9 #define GrRenderTargetPriv_DEFINED 9 #define GrRenderTargetPriv_DEFINED
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 /** 26 /**
27 * Attaches the GrStencilAttachment onto the render target. If stencil is a nullptr then the 27 * Attaches the GrStencilAttachment onto the render target. If stencil is a nullptr then the
28 * currently attached GrStencilAttachment will be removed if one was previou sly attached. This 28 * currently attached GrStencilAttachment will be removed if one was previou sly attached. This
29 * function returns false if there were any failure in attaching the GrStenc ilAttachment. 29 * function returns false if there were any failure in attaching the GrStenc ilAttachment.
30 */ 30 */
31 bool attachStencilAttachment(GrStencilAttachment* stencil); 31 bool attachStencilAttachment(GrStencilAttachment* stencil);
32 32
33 int numStencilBits() const; 33 int numStencilBits() const;
34 34
35 // Finds a render target's multisample specs. The stencil settings are only needed in case the 35 // Finds a render target's multisample specs. The pipeline is only needed in case the info isn't
36 // info isn't cached and we need to flush the draw state in order to query i t. They are not 36 // cached and we need to flush the draw state in order to query it. The pipe line is not expected
37 // expected to affect the multisample information itself. 37 // to affect the multisample information itself.
38 const GrGpu::MultisampleSpecs& getMultisampleSpecs(const GrStencilSettings& stencil) const; 38 const GrGpu::MultisampleSpecs& getMultisampleSpecs(const GrPipeline&) const;
39 39
40 typedef GrRenderTarget::Flags Flags; 40 typedef GrRenderTarget::Flags Flags;
41 41
42 Flags flags() const { return fRenderTarget->fFlags; } 42 Flags flags() const { return fRenderTarget->fFlags; }
43 int maxWindowRectangles() const; 43 int maxWindowRectangles() const;
44 44
45 private: 45 private:
46 explicit GrRenderTargetPriv(GrRenderTarget* renderTarget) : fRenderTarget(re nderTarget) {} 46 explicit GrRenderTargetPriv(GrRenderTarget* renderTarget) : fRenderTarget(re nderTarget) {}
47 GrRenderTargetPriv(const GrRenderTargetPriv&) {} // unimpl 47 GrRenderTargetPriv(const GrRenderTargetPriv&) {} // unimpl
48 GrRenderTargetPriv& operator=(const GrRenderTargetPriv&); // unimpl 48 GrRenderTargetPriv& operator=(const GrRenderTargetPriv&); // unimpl
49 49
50 // No taking addresses of this type. 50 // No taking addresses of this type.
51 const GrRenderTargetPriv* operator&() const; 51 const GrRenderTargetPriv* operator&() const;
52 GrRenderTargetPriv* operator&(); 52 GrRenderTargetPriv* operator&();
53 53
54 GrRenderTarget* fRenderTarget; 54 GrRenderTarget* fRenderTarget;
55 55
56 friend class GrRenderTarget; // to construct/copy this type. 56 friend class GrRenderTarget; // to construct/copy this type.
57 }; 57 };
58 58
59 inline GrRenderTargetPriv GrRenderTarget::renderTargetPriv() { return GrRenderTa rgetPriv(this); } 59 inline GrRenderTargetPriv GrRenderTarget::renderTargetPriv() { return GrRenderTa rgetPriv(this); }
60 60
61 inline const GrRenderTargetPriv GrRenderTarget::renderTargetPriv () const { 61 inline const GrRenderTargetPriv GrRenderTarget::renderTargetPriv () const {
62 return GrRenderTargetPriv(const_cast<GrRenderTarget*>(this)); 62 return GrRenderTargetPriv(const_cast<GrRenderTarget*>(this));
63 } 63 }
64 64
65 #endif 65 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRenderTarget.cpp ('k') | src/gpu/GrStencilSettings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698