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

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

Issue 674543004: OptState owns program descriptor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleaup 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 | « gyp/gpu.gypi ('k') | src/gpu/GrOptDrawState.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 * 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 GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
11 #include "GrDrawTarget.h" 11 #include "GrDrawTarget.h"
12 #include "GrClipMaskManager.h" 12 #include "GrClipMaskManager.h"
13 #include "GrPathRendering.h" 13 #include "GrPathRendering.h"
14 #include "GrProgramDesc.h"
14 #include "SkPath.h" 15 #include "SkPath.h"
15 16
16 class GrContext; 17 class GrContext;
17 class GrIndexBufferAllocPool; 18 class GrIndexBufferAllocPool;
18 class GrPath; 19 class GrPath;
19 class GrPathRange; 20 class GrPathRange;
20 class GrPathRenderer; 21 class GrPathRenderer;
21 class GrPathRendererChain; 22 class GrPathRendererChain;
22 class GrStencilBuffer; 23 class GrStencilBuffer;
23 class GrVertexBufferAllocPool; 24 class GrVertexBufferAllocPool;
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 kDrawPath_DrawType, 318 kDrawPath_DrawType,
318 kDrawPaths_DrawType, 319 kDrawPaths_DrawType,
319 }; 320 };
320 321
321 static bool IsPathRenderingDrawType(DrawType type) { 322 static bool IsPathRenderingDrawType(DrawType type) {
322 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type; 323 return kDrawPath_DrawType == type || kDrawPaths_DrawType == type;
323 } 324 }
324 325
325 GrContext::GPUStats* gpuStats() { return &fGPUStats; } 326 GrContext::GPUStats* gpuStats() { return &fGPUStats; }
326 327
328 virtual void buildProgramDesc(const GrOptDrawState&,
329 const GrProgramDesc::DescInfo&,
330 GrGpu::DrawType,
331 const GrDeviceCoordTexture* dstCopy,
332 GrProgramDesc*) = 0;
333
327 protected: 334 protected:
328 DrawType PrimTypeToDrawType(GrPrimitiveType type) { 335 DrawType PrimTypeToDrawType(GrPrimitiveType type) {
329 switch (type) { 336 switch (type) {
330 case kTriangles_GrPrimitiveType: 337 case kTriangles_GrPrimitiveType:
331 case kTriangleStrip_GrPrimitiveType: 338 case kTriangleStrip_GrPrimitiveType:
332 case kTriangleFan_GrPrimitiveType: 339 case kTriangleFan_GrPrimitiveType:
333 return kDrawTriangles_DrawType; 340 return kDrawTriangles_DrawType;
334 case kPoints_GrPrimitiveType: 341 case kPoints_GrPrimitiveType:
335 return kDrawPoints_DrawType; 342 return kDrawPoints_DrawType;
336 case kLines_GrPrimitiveType: 343 case kLines_GrPrimitiveType:
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 // counts number of uses of vertex/index pool in the geometry stack 504 // counts number of uses of vertex/index pool in the geometry stack
498 int fVertexP oolUseCnt; 505 int fVertexP oolUseCnt;
499 int fIndexPo olUseCnt; 506 int fIndexPo olUseCnt;
500 // these are mutable so they can be created on-demand 507 // these are mutable so they can be created on-demand
501 mutable GrIndexBuffer* fQuadInd exBuffer; 508 mutable GrIndexBuffer* fQuadInd exBuffer;
502 509
503 typedef GrDrawTarget INHERITED; 510 typedef GrDrawTarget INHERITED;
504 }; 511 };
505 512
506 #endif 513 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrOptDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698