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

Side by Side Diff: include/gpu/GrTypes.h

Issue 2318603002: Update Vulkan docs (Closed)
Patch Set: fix var name Created 4 years, 3 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 | « no previous file | site/user/special/vulkan.md » ('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 GrTypes_DEFINED 8 #ifndef GrTypes_DEFINED
9 #define GrTypes_DEFINED 9 #define GrTypes_DEFINED
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 kOpenGL_GrBackend, 135 kOpenGL_GrBackend,
136 kVulkan_GrBackend, 136 kVulkan_GrBackend,
137 137
138 kLast_GrBackend = kVulkan_GrBackend 138 kLast_GrBackend = kVulkan_GrBackend
139 }; 139 };
140 const int kBackendCount = kLast_GrBackend + 1; 140 const int kBackendCount = kLast_GrBackend + 1;
141 141
142 /** 142 /**
143 * Backend-specific 3D context handle 143 * Backend-specific 3D context handle
144 * GrGLInterface* for OpenGL. If NULL will use the default GL interface. 144 * GrGLInterface* for OpenGL. If NULL will use the default GL interface.
145 * GrVkBackendContext* for Vulkan.
145 */ 146 */
146 typedef intptr_t GrBackendContext; 147 typedef intptr_t GrBackendContext;
147 148
148 /////////////////////////////////////////////////////////////////////////////// 149 ///////////////////////////////////////////////////////////////////////////////
149 150
150 /** 151 /**
151 * Geometric primitives used for drawing. 152 * Geometric primitives used for drawing.
152 */ 153 */
153 enum GrPrimitiveType { 154 enum GrPrimitiveType {
154 kTriangles_GrPrimitiveType, 155 kTriangles_GrPrimitiveType,
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 int fHeight; //<! height in pixels 563 int fHeight; //<! height in pixels
563 GrPixelConfig fConfig; //<! color format 564 GrPixelConfig fConfig; //<! color format
564 /** 565 /**
565 * If the render target flag is set and sample count is greater than 0 566 * If the render target flag is set and sample count is greater than 0
566 * then Gr will create an MSAA buffer that resolves to the texture. 567 * then Gr will create an MSAA buffer that resolves to the texture.
567 */ 568 */
568 int fSampleCnt; 569 int fSampleCnt;
569 /** 570 /**
570 * Handle to the 3D API object. 571 * Handle to the 3D API object.
571 * OpenGL: Texture ID. 572 * OpenGL: Texture ID.
573 * Vulkan: GrVkImageInfo*
572 */ 574 */
573 GrBackendObject fTextureHandle; 575 GrBackendObject fTextureHandle;
574 }; 576 };
575 577
576 /////////////////////////////////////////////////////////////////////////////// 578 ///////////////////////////////////////////////////////////////////////////////
577 579
578 /** 580 /**
579 * Gr can wrap an existing render target created by the client in the 3D API 581 * Gr can wrap an existing render target created by the client in the 3D API
580 * with a GrRenderTarget object. The client is responsible for ensuring that the 582 * with a GrRenderTarget object. The client is responsible for ensuring that the
581 * underlying 3D API object lives at least as long as the GrRenderTarget object 583 * underlying 3D API object lives at least as long as the GrRenderTarget object
(...skipping 14 matching lines...) Expand all
596 * about applying other forms of anti-aliasing. 598 * about applying other forms of anti-aliasing.
597 */ 599 */
598 int fSampleCnt; 600 int fSampleCnt;
599 /** 601 /**
600 * Number of bits of stencil per-pixel. 602 * Number of bits of stencil per-pixel.
601 */ 603 */
602 int fStencilBits; 604 int fStencilBits;
603 /** 605 /**
604 * Handle to the 3D API object. 606 * Handle to the 3D API object.
605 * OpenGL: FBO ID 607 * OpenGL: FBO ID
608 * Vulkan: GrVkImageInfo*
606 */ 609 */
607 GrBackendObject fRenderTargetHandle; 610 GrBackendObject fRenderTargetHandle;
608 }; 611 };
609 612
610 /** 613 /**
611 * The GrContext's cache of backend context state can be partially invalidated. 614 * The GrContext's cache of backend context state can be partially invalidated.
612 * These enums are specific to the GL backend and we'd add a new set for an alte rnative backend. 615 * These enums are specific to the GL backend and we'd add a new set for an alte rnative backend.
613 */ 616 */
614 enum GrGLBackendState { 617 enum GrGLBackendState {
615 kRenderTarget_GrGLBackendState = 1 << 0, 618 kRenderTarget_GrGLBackendState = 1 << 0,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 return 4 * width * height; 659 return 4 * width * height;
657 } 660 }
658 } 661 }
659 662
660 /** 663 /**
661 * This value translates to reseting all the context state for any backend. 664 * This value translates to reseting all the context state for any backend.
662 */ 665 */
663 static const uint32_t kAll_GrBackendState = 0xffffffff; 666 static const uint32_t kAll_GrBackendState = 0xffffffff;
664 667
665 #endif 668 #endif
OLDNEW
« no previous file with comments | « no previous file | site/user/special/vulkan.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698