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

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

Issue 709133003: Snap optdrawstate in inorder draw buffer and pass into gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@remove_friends
Patch Set: Created 6 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') | src/gpu/gl/GrGpuGL.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 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 #ifndef GrGpuGL_DEFINED 8 #ifndef GrGpuGL_DEFINED
9 #define GrGpuGL_DEFINED 9 #define GrGpuGL_DEFINED
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void* buffer, 146 void* buffer,
147 size_t rowBytes) SK_OVERRIDE; 147 size_t rowBytes) SK_OVERRIDE;
148 148
149 virtual bool onWriteTexturePixels(GrTexture* texture, 149 virtual bool onWriteTexturePixels(GrTexture* texture,
150 int left, int top, int width, int height, 150 int left, int top, int width, int height,
151 GrPixelConfig config, const void* buffer, 151 GrPixelConfig config, const void* buffer,
152 size_t rowBytes) SK_OVERRIDE; 152 size_t rowBytes) SK_OVERRIDE;
153 153
154 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; 154 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
155 155
156 virtual void onDraw(const GrDrawTarget::DrawInfo&) SK_OVERRIDE; 156 virtual void onDraw(const GrOptDrawState&, const GrDrawTarget::DrawInfo&) SK _OVERRIDE;
157 157
158 158
159 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; 159 virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE;
160 virtual bool flushGraphicsState(DrawType, 160 virtual bool flushGraphicsState(const GrOptDrawState&,
161 DrawType,
161 const GrClipMaskManager::ScissorState&, 162 const GrClipMaskManager::ScissorState&,
162 const GrDeviceCoordTexture* dstCopy) SK_OVER RIDE; 163 const GrDeviceCoordTexture* dstCopy) SK_OVER RIDE;
163 164
164 // GrDrawTarget overrides 165 // GrDrawTarget overrides
165 virtual void didAddGpuTraceMarker() SK_OVERRIDE; 166 virtual void didAddGpuTraceMarker() SK_OVERRIDE;
166 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE; 167 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE;
167 168
168 // binds texture unit in GL 169 // binds texture unit in GL
169 void setTextureUnit(int unitIdx); 170 void setTextureUnit(int unitIdx);
170 171
171 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset 172 // Sets up vertex attribute pointers and strides. On return indexOffsetInByt es gives the offset
172 // an into the index buffer. It does not account for drawInfo.startIndex() b ut rather the start 173 // an into the index buffer. It does not account for drawInfo.startIndex() b ut rather the start
173 // index is relative to the returned offset. 174 // index is relative to the returned offset.
174 void setupGeometry(const GrDrawTarget::DrawInfo& info, size_t* indexOffsetIn Bytes); 175 void setupGeometry(const GrOptDrawState&,
176 const GrDrawTarget::DrawInfo& info,
177 size_t* indexOffsetInBytes);
175 178
176 // Subclasses should call this to flush the blend state. 179 // Subclasses should call this to flush the blend state.
177 // The params should be the final coefficients to apply 180 // The params should be the final coefficients to apply
178 // (after any blending optimizations or dual source blending considerations 181 // (after any blending optimizations or dual source blending considerations
179 // have been accounted for). 182 // have been accounted for).
180 void flushBlend(const GrOptDrawState& optState, bool isLines, 183 void flushBlend(const GrOptDrawState& optState, bool isLines,
181 GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff); 184 GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff);
182 185
183 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex t); } 186 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex t); }
184 187
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 453
451 // we record what stencil format worked last time to hopefully exit early 454 // we record what stencil format worked last time to hopefully exit early
452 // from our loop that tries stencil formats and calls check fb status. 455 // from our loop that tries stencil formats and calls check fb status.
453 int fLastSuccessfulStencilFmtIdx; 456 int fLastSuccessfulStencilFmtIdx;
454 457
455 typedef GrGpu INHERITED; 458 typedef GrGpu INHERITED;
456 friend class GrGLPathRendering; // For accessing setTextureUnit. 459 friend class GrGLPathRendering; // For accessing setTextureUnit.
457 }; 460 };
458 461
459 #endif 462 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698