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

Side by Side Diff: src/gpu/GrTest.cpp

Issue 777673003: move program descriptor generation to flush (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 6 years 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrTest.h" 9 #include "GrTest.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const SK_OVERRIDE { 57 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const SK_OVERRIDE {
58 return true; 58 return true;
59 } 59 }
60 60
61 bool readPixelsWillPayForYFlip(GrRenderTarget* renderTarget, 61 bool readPixelsWillPayForYFlip(GrRenderTarget* renderTarget,
62 int left, int top, 62 int left, int top,
63 int width, int height, 63 int width, int height,
64 GrPixelConfig config, 64 GrPixelConfig config,
65 size_t rowBytes) const SK_OVERRIDE { return f alse; } 65 size_t rowBytes) const SK_OVERRIDE { return f alse; }
66 void buildProgramDesc(const GrOptDrawState&, 66 void buildProgramDesc(const GrOptDrawState&,
67 const GrProgramDesc::DescInfo&,
68 GrGpu::DrawType, 67 GrGpu::DrawType,
69 GrProgramDesc* desc) SK_OVERRIDE {} 68 GrProgramDesc* desc) SK_OVERRIDE {}
70 69
71 void discard(GrRenderTarget*) SK_OVERRIDE {} 70 void discard(GrRenderTarget*) SK_OVERRIDE {}
72 71
73 bool canCopySurface(const GrSurface* dst, 72 bool canCopySurface(const GrSurface* dst,
74 const GrSurface* src, 73 const GrSurface* src,
75 const SkIRect& srcRect, 74 const SkIRect& srcRect,
76 const SkIPoint& dstPoint) SK_OVERRIDE { return false; }; 75 const SkIPoint& dstPoint) SK_OVERRIDE { return false; };
77 76
(...skipping 24 matching lines...) Expand all
102 101
103 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE { 102 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE {
104 return NULL; 103 return NULL;
105 } 104 }
106 105
107 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_OVERRIDE { return NULL; } 106 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_OVERRIDE { return NULL; }
108 107
109 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVERRIDE { return NULL; } 108 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVERRIDE { return NULL; }
110 109
111 void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, 110 void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
112 bool canIgnoreRect) SK_OVERRIDE {} 111 bool canIgnoreRect) SK_OVERRIDE {}
113 112
114 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) SK_OVERRIDE {} 113 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) SK_OVERRIDE {}
115 114
116 void onDraw(const GrOptDrawState&, const GrDrawTarget::DrawInfo&) SK_OVERRID E {} 115 void onDraw(const GrOptDrawState&, const GrDrawTarget::DrawInfo&) SK_OVERRID E {}
117 116
118 bool onReadPixels(GrRenderTarget* target, 117 bool onReadPixels(GrRenderTarget* target,
119 int left, int top, int width, int height, 118 int left, int top, int width, int height,
120 GrPixelConfig, 119 GrPixelConfig,
121 void* buffer, 120 void* buffer,
122 size_t rowBytes) SK_OVERRIDE { 121 size_t rowBytes) SK_OVERRIDE {
(...skipping 10 matching lines...) Expand all
133 void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE { return; } 132 void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE { return; }
134 133
135 bool createStencilBufferForRenderTarget(GrRenderTarget*, int width, int heig ht) SK_OVERRIDE { 134 bool createStencilBufferForRenderTarget(GrRenderTarget*, int width, int heig ht) SK_OVERRIDE {
136 return false; 135 return false;
137 } 136 }
138 137
139 bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTarget*) SK _OVERRIDE { 138 bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTarget*) SK _OVERRIDE {
140 return false; 139 return false;
141 } 140 }
142 141
143 bool flushGraphicsState(const GrOptDrawState&, DrawType) SK_OVERRIDE { retur n false; } 142 bool flushGraphicsState(const GrOptDrawState&, const GrProgramDesc&,
143 DrawType) SK_OVERRIDE { return false; }
144 144
145 void clearStencil(GrRenderTarget* target) SK_OVERRIDE {} 145 void clearStencil(GrRenderTarget* target) SK_OVERRIDE {}
146 146
147 void didAddGpuTraceMarker() SK_OVERRIDE { } 147 void didAddGpuTraceMarker() SK_OVERRIDE { }
148 148
149 void didRemoveGpuTraceMarker() SK_OVERRIDE { } 149 void didRemoveGpuTraceMarker() SK_OVERRIDE { }
150 150
151 typedef GrGpu INHERITED; 151 typedef GrGpu INHERITED;
152 }; 152 };
153 153
(...skipping 14 matching lines...) Expand all
168 // these objects are required for any of tests that use this context. TODO: make stop allocating 168 // these objects are required for any of tests that use this context. TODO: make stop allocating
169 // resources in the buffer pools. 169 // resources in the buffer pools.
170 SkDELETE(fDrawBuffer); 170 SkDELETE(fDrawBuffer);
171 SkDELETE(fDrawBufferVBAllocPool); 171 SkDELETE(fDrawBufferVBAllocPool);
172 SkDELETE(fDrawBufferIBAllocPool); 172 SkDELETE(fDrawBufferIBAllocPool);
173 173
174 fDrawBuffer = NULL; 174 fDrawBuffer = NULL;
175 fDrawBufferVBAllocPool = NULL; 175 fDrawBufferVBAllocPool = NULL;
176 fDrawBufferIBAllocPool = NULL; 176 fDrawBufferIBAllocPool = NULL;
177 } 177 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698