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

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

Issue 2038583002: Add GpuCommandBuffer support. (Closed) Base URL: https://skia.googlesource.com/skia.git@secondaryCB
Patch Set: Created 4 years, 6 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 | « gyp/gpu.gypi ('k') | src/gpu/GrGpuCommandBuffer.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 "GrGpuCommandBuffer.h"
11 #include "GrPipelineBuilder.h" 12 #include "GrPipelineBuilder.h"
12 #include "GrProgramDesc.h" 13 #include "GrProgramDesc.h"
13 #include "GrSwizzle.h" 14 #include "GrSwizzle.h"
14 #include "GrAllocator.h" 15 #include "GrAllocator.h"
15 #include "GrTextureParamsAdjuster.h" 16 #include "GrTextureParamsAdjuster.h"
16 #include "GrTypes.h" 17 #include "GrTypes.h"
17 #include "GrXferProcessor.h" 18 #include "GrXferProcessor.h"
18 #include "SkPath.h" 19 #include "SkPath.h"
19 #include "SkTArray.h" 20 #include "SkTArray.h"
20 21
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // If sample locations are supported, contains the subpixel locations at which the GPU will 354 // If sample locations are supported, contains the subpixel locations at which the GPU will
354 // sample. Pixel center is at (.5, .5) and (0, 0) indicates the top left corner. 355 // sample. Pixel center is at (.5, .5) and (0, 0) indicates the top left corner.
355 SkAutoTDeleteArray<const SkPoint> fSampleLocations; 356 SkAutoTDeleteArray<const SkPoint> fSampleLocations;
356 }; 357 };
357 358
358 // Finds a render target's multisample specs. The stencil settings are only needed to flush the 359 // Finds a render target's multisample specs. The stencil settings are only needed to flush the
359 // draw state prior to querying multisample information; they should not hav e any effect on the 360 // draw state prior to querying multisample information; they should not hav e any effect on the
360 // multisample information itself. 361 // multisample information itself.
361 const MultisampleSpecs& getMultisampleSpecs(GrRenderTarget*, const GrStencil Settings&); 362 const MultisampleSpecs& getMultisampleSpecs(GrRenderTarget*, const GrStencil Settings&);
362 363
364 // Creates a GrGpuCommandBuffer in which the GrDrawTarget can send draw comm ands to instead of
365 // directly to the Gpu object.
366 virtual GrGpuCommandBuffer* createCommandBuffer(const GrRenderTarget& target ,
367 GrGpuCommandBuffer::LoadAndS toreOp colorOp,
368 GrColor colorClear,
369 GrGpuCommandBuffer::LoadAndS toreOp stencilOp,
370 GrColor stencilClear) = 0;
371
363 // We pass in an array of meshCount GrMesh to the draw. The backend should l oop over each 372 // We pass in an array of meshCount GrMesh to the draw. The backend should l oop over each
364 // GrMesh object and emit a draw for it. Each draw will use the same GrPipel ine and 373 // GrMesh object and emit a draw for it. Each draw will use the same GrPipel ine and
365 // GrPrimitiveProcessor. This may fail if the draw would exceed any resource limits (e.g. 374 // GrPrimitiveProcessor. This may fail if the draw would exceed any resource limits (e.g.
366 // number of vertex attributes is too large). 375 // number of vertex attributes is too large).
367 bool draw(const GrPipeline&, 376 bool draw(const GrPipeline&,
368 const GrPrimitiveProcessor&, 377 const GrPrimitiveProcessor&,
369 const GrMesh*, 378 const GrMesh*,
370 int meshCount); 379 int meshCount);
371 380
372 // Called by drawtarget when flushing. 381 // Called by drawtarget when flushing.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 SkTArray<const MultisampleSpecs*, true> fMultisa mpleSpecsMap; 612 SkTArray<const MultisampleSpecs*, true> fMultisa mpleSpecsMap;
604 GrTAllocator<MultisampleSpecs> fMultisa mpleSpecsAllocator; 613 GrTAllocator<MultisampleSpecs> fMultisa mpleSpecsAllocator;
605 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 614 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
606 GrContext* fContext ; 615 GrContext* fContext ;
607 616
608 friend class GrPathRendering; 617 friend class GrPathRendering;
609 typedef SkRefCnt INHERITED; 618 typedef SkRefCnt INHERITED;
610 }; 619 };
611 620
612 #endif 621 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrGpuCommandBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698