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

Side by Side Diff: src/gpu/gl/GrGLRenderTarget.h

Issue 1415873011: Revert of Enable stencil clipping in mixed sampled render targets (patchset #6 id:100001 of https:/… (Closed) Base URL: https://skia.googlesource.com/skia.git@reverts2
Patch Set: Created 5 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/gl/GrGLPathRendering.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 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 8
9 #ifndef GrGLRenderTarget_DEFINED 9 #ifndef GrGLRenderTarget_DEFINED
10 #define GrGLRenderTarget_DEFINED 10 #define GrGLRenderTarget_DEFINED
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 /** When we don't own the FBO ID we don't attempt to modify its attachments. */ 64 /** When we don't own the FBO ID we don't attempt to modify its attachments. */
65 bool canAttemptStencilAttachment() const override { 65 bool canAttemptStencilAttachment() const override {
66 return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLi fecycle; 66 return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLi fecycle;
67 } 67 }
68 68
69 // GrGLRenderTarget overrides dumpMemoryStatistics so it can log its texture and renderbuffer 69 // GrGLRenderTarget overrides dumpMemoryStatistics so it can log its texture and renderbuffer
70 // components seperately. 70 // components seperately.
71 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override ; 71 void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override ;
72 72
73 /**
74 * @return true if sample locations colocated at pixel center have been set for this
75 * render target. Requires support for NV_sample_locations.
76 */
77 bool usesColocatedSampleLocations() const {
78 return fUsesColocatedSampleLocations;
79 }
80
81 /**
82 * Flag render target as using or not using sample locations colocated at pi xel center.
83 */
84 void flagAsUsingColocatedSampleLocations(bool useColocatedSampleLocations) {
85 fUsesColocatedSampleLocations = useColocatedSampleLocations;
86 }
87
88 protected: 73 protected:
89 // The public constructor registers this object with the cache. However, onl y the most derived 74 // The public constructor registers this object with the cache. However, onl y the most derived
90 // class should register with the cache. This constructor does not do the re gistration and 75 // class should register with the cache. This constructor does not do the re gistration and
91 // rather moves that burden onto the derived class. 76 // rather moves that burden onto the derived class.
92 enum Derived { kDerived }; 77 enum Derived { kDerived };
93 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived); 78 GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, Derived);
94 79
95 void init(const GrSurfaceDesc&, const IDDesc&); 80 void init(const GrSurfaceDesc&, const IDDesc&);
96 81
97 void onAbandon() override; 82 void onAbandon() override;
(...skipping 26 matching lines...) Expand all
124 109
125 // when we switch to this render target we want to set the viewport to 110 // when we switch to this render target we want to set the viewport to
126 // only render to content area (as opposed to the whole allocation) and 111 // only render to content area (as opposed to the whole allocation) and
127 // we want the rendering to be at top left (GL has origin in bottom left) 112 // we want the rendering to be at top left (GL has origin in bottom left)
128 GrGLIRect fViewport; 113 GrGLIRect fViewport;
129 114
130 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However , abandon and 115 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However , abandon and
131 // release zero out the IDs and the cache needs to know the size even after those actions. 116 // release zero out the IDs and the cache needs to know the size even after those actions.
132 size_t fGpuMemorySize; 117 size_t fGpuMemorySize;
133 118
134 // True if sample locations colocated at pixel center are currently in use, false if default
135 // sample locations are currently in use.
136 bool fUsesColocatedSampleLocations;
137
138 typedef GrRenderTarget INHERITED; 119 typedef GrRenderTarget INHERITED;
139 }; 120 };
140 121
141 #endif 122 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698