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

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

Issue 1288963004: ClearStencilClip in GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tiny Created 5 years, 4 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/GrCommandBuilder.cpp ('k') | src/gpu/GrDrawTarget.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 2010 Google Inc. 2 * Copyright 2010 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 GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required 230 // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
231 // but couldn't be made. Otherwise, returns true. This method needs to be p rotected because it 231 // but couldn't be made. Otherwise, returns true. This method needs to be p rotected because it
232 // needs to be accessed by GLPrograms to setup a correct drawstate 232 // needs to be accessed by GLPrograms to setup a correct drawstate
233 bool setupDstReadIfNecessary(const GrPipelineBuilder&, 233 bool setupDstReadIfNecessary(const GrPipelineBuilder&,
234 const GrProcOptInfo& colorPOI, 234 const GrProcOptInfo& colorPOI,
235 const GrProcOptInfo& coveragePOI, 235 const GrProcOptInfo& coveragePOI,
236 GrXferProcessor::DstTexture*, 236 GrXferProcessor::DstTexture*,
237 const SkRect* drawBounds); 237 const SkRect* drawBounds);
238 238
239 virtual void onDrawBatch(GrBatch*) = 0;
240
239 private: 241 private:
240 virtual void onReset() = 0; 242 virtual void onReset() = 0;
241 243
242 virtual void onFlush() = 0; 244 virtual void onFlush() = 0;
243 245
244 virtual void onDrawBatch(GrBatch*) = 0;
245 virtual void onStencilPath(const GrPipelineBuilder&, 246 virtual void onStencilPath(const GrPipelineBuilder&,
246 const GrPathProcessor*, 247 const GrPathProcessor*,
247 const GrPath*, 248 const GrPath*,
248 const GrScissorState&, 249 const GrScissorState&,
249 const GrStencilSettings&) = 0; 250 const GrStencilSettings&) = 0;
250 virtual void onDrawPath(const GrPathProcessor*, 251 virtual void onDrawPath(const GrPathProcessor*,
251 const GrPath*, 252 const GrPath*,
252 const GrStencilSettings&, 253 const GrStencilSettings&,
253 const PipelineInfo&) = 0; 254 const PipelineInfo&) = 0;
254 virtual void onDrawPaths(const GrPathProcessor*, 255 virtual void onDrawPaths(const GrPathProcessor*,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 */ 305 */
305 GrContext* getContext() { return fContext; } 306 GrContext* getContext() { return fContext; }
306 const GrContext* getContext() const { return fContext; } 307 const GrContext* getContext() const { return fContext; }
307 308
308 /** 309 /**
309 * Clip Mask Manager(and no one else) needs to clear private stencil bits. 310 * Clip Mask Manager(and no one else) needs to clear private stencil bits.
310 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass 311 * ClipTarget subclass sets clip bit in the stencil buffer. The subclass
311 * is free to clear the remaining bits to zero if masked clears are more 312 * is free to clear the remaining bits to zero if masked clears are more
312 * expensive than clearing all bits. 313 * expensive than clearing all bits.
313 */ 314 */
314 virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRender Target* = NULL) = 0; 315 void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*);
315 316
316 /** 317 /**
317 * Release any resources that are cached but not currently in use. This 318 * Release any resources that are cached but not currently in use. This
318 * is intended to give an application some recourse when resources are low. 319 * is intended to give an application some recourse when resources are low.
319 */ 320 */
320 void purgeResources() override; 321 void purgeResources() override;
321 322
322 protected: 323 protected:
323 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; 324 SkAutoTDelete<GrClipMaskManager> fClipMaskManager;
324 GrContext* fContext; 325 GrContext* fContext;
325 326
326 private: 327 private:
327 GrClipMaskManager* clipMaskManager() override { return fClipMaskManager; } 328 GrClipMaskManager* clipMaskManager() override { return fClipMaskManager; }
328 329
329 bool setupClip(const GrPipelineBuilder&, 330 bool setupClip(const GrPipelineBuilder&,
330 GrPipelineBuilder::AutoRestoreFragmentProcessorState*, 331 GrPipelineBuilder::AutoRestoreFragmentProcessorState*,
331 GrPipelineBuilder::AutoRestoreStencil*, 332 GrPipelineBuilder::AutoRestoreStencil*,
332 GrScissorState* scissorState, 333 GrScissorState* scissorState,
333 const SkRect* devBounds) override; 334 const SkRect* devBounds) override;
334 335
335 typedef GrDrawTarget INHERITED; 336 typedef GrDrawTarget INHERITED;
336 }; 337 };
337 338
338 #endif 339 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrCommandBuilder.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698