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

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

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const 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/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.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 GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 * palette data for paletted textures. For compressed 98 * palette data for paletted textures. For compressed
99 * formats it contains the compressed pixel data. Otherwi se, 99 * formats it contains the compressed pixel data. Otherwi se,
100 * it contains width*height texels. If NULL texture data 100 * it contains width*height texels. If NULL texture data
101 * is uninitialized. 101 * is uninitialized.
102 * @param rowBytes the number of bytes between consecutive rows. Zero 102 * @param rowBytes the number of bytes between consecutive rows. Zero
103 * means rows are tightly packed. This field is ignored 103 * means rows are tightly packed. This field is ignored
104 * for compressed formats. 104 * for compressed formats.
105 * 105 *
106 * @return The texture object if successful, otherwise NULL. 106 * @return The texture object if successful, otherwise NULL.
107 */ 107 */
108 GrTexture* createTexture(const GrTextureDesc& desc, 108 GrTexture* createTexture(const GrSurfaceDesc& desc,
109 const void* srcData, size_t rowBytes); 109 const void* srcData, size_t rowBytes);
110 110
111 /** 111 /**
112 * Implements GrContext::wrapBackendTexture 112 * Implements GrContext::wrapBackendTexture
113 */ 113 */
114 GrTexture* wrapBackendTexture(const GrBackendTextureDesc&); 114 GrTexture* wrapBackendTexture(const GrBackendTextureDesc&);
115 115
116 /** 116 /**
117 * Implements GrContext::wrapBackendTexture 117 * Implements GrContext::wrapBackendTexture
118 */ 118 */
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 virtual void releaseIndexArray() SK_OVERRIDE; 392 virtual void releaseIndexArray() SK_OVERRIDE;
393 virtual void geometrySourceWillPush() SK_OVERRIDE; 393 virtual void geometrySourceWillPush() SK_OVERRIDE;
394 virtual void geometrySourceWillPop(const GeometrySrcState& restoredState) SK _OVERRIDE; 394 virtual void geometrySourceWillPop(const GeometrySrcState& restoredState) SK _OVERRIDE;
395 395
396 396
397 // called when the 3D context state is unknown. Subclass should emit any 397 // called when the 3D context state is unknown. Subclass should emit any
398 // assumed 3D context state and dirty any state cache. 398 // assumed 3D context state and dirty any state cache.
399 virtual void onResetContext(uint32_t resetBits) = 0; 399 virtual void onResetContext(uint32_t resetBits) = 0;
400 400
401 // overridden by backend-specific derived class to create objects. 401 // overridden by backend-specific derived class to create objects.
402 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc, 402 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc,
403 const void* srcData, 403 const void* srcData,
404 size_t rowBytes) = 0; 404 size_t rowBytes) = 0;
405 virtual GrTexture* onCreateCompressedTexture(const GrTextureDesc& desc, 405 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
406 const void* srcData) = 0; 406 const void* srcData) = 0;
407 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) = 0; 407 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) = 0;
408 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) = 0; 408 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&) = 0;
409 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0; 409 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0;
410 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0; 410 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0;
411 411
412 // overridden by backend-specific derived class to perform the clear and 412 // overridden by backend-specific derived class to perform the clear and
413 // clearRect. NULL rect means clear whole target. If canIgnoreRect is 413 // clearRect. NULL rect means clear whole target. If canIgnoreRect is
414 // true, it is okay to perform a full clear instead of a partial clear 414 // true, it is okay to perform a full clear instead of a partial clear
415 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, 415 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 // counts number of uses of vertex/index pool in the geometry stack 497 // counts number of uses of vertex/index pool in the geometry stack
498 int fVertexP oolUseCnt; 498 int fVertexP oolUseCnt;
499 int fIndexPo olUseCnt; 499 int fIndexPo olUseCnt;
500 // these are mutable so they can be created on-demand 500 // these are mutable so they can be created on-demand
501 mutable GrIndexBuffer* fQuadInd exBuffer; 501 mutable GrIndexBuffer* fQuadInd exBuffer;
502 502
503 typedef GrDrawTarget INHERITED; 503 typedef GrDrawTarget INHERITED;
504 }; 504 };
505 505
506 #endif 506 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698