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

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

Issue 1260293004: Revert of Move draw on upload decision in GrGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « src/gpu/GrGpu.cpp ('k') | src/gpu/gl/GrGLGpu.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 /* 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 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 #include "GrGpu.h" 139 #include "GrGpu.h"
140 140
141 class GrPipeline; 141 class GrPipeline;
142 142
143 class MockGpu : public GrGpu { 143 class MockGpu : public GrGpu {
144 public: 144 public:
145 MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(con text) { 145 MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(con text) {
146 fCaps.reset(SkNEW_ARGS(GrCaps, (options))); 146 fCaps.reset(SkNEW_ARGS(GrCaps, (options)));
147 } 147 }
148 ~MockGpu() override {} 148 ~MockGpu() override {}
149 bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const override {
150 return true;
151 }
149 152
150 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes, 153 bool getReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeight, size_t rowBytes,
151 GrPixelConfig readConfig, DrawPreference*, 154 GrPixelConfig readConfig, DrawPreference*,
152 ReadPixelTempDrawInfo*) override { return false; } 155 ReadPixelTempDrawInfo*) override { return false; }
153
154 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, size _t rowBytes,
155 GrPixelConfig srcConfig, DrawPreference*,
156 WritePixelTempDrawInfo*) override { return false; }
157 156
158 void buildProgramDesc(GrProgramDesc*,const GrPrimitiveProcessor&, 157 void buildProgramDesc(GrProgramDesc*,const GrPrimitiveProcessor&,
159 const GrPipeline&, 158 const GrPipeline&,
160 const GrBatchTracker&) const override {} 159 const GrBatchTracker&) const override {}
161 160
162 void discard(GrRenderTarget*) override {} 161 void discard(GrRenderTarget*) override {}
163 162
164 bool copySurface(GrSurface* dst, 163 bool copySurface(GrSurface* dst,
165 GrSurface* src, 164 GrSurface* src,
166 const SkIRect& srcRect, 165 const SkIRect& srcRect,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 SkASSERT(NULL == fGpu); 257 SkASSERT(NULL == fGpu);
259 fGpu = SkNEW_ARGS(MockGpu, (this, options)); 258 fGpu = SkNEW_ARGS(MockGpu, (this, options));
260 SkASSERT(fGpu); 259 SkASSERT(fGpu);
261 this->initCommon(); 260 this->initCommon();
262 261
263 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 262 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
264 // these objects are required for any of tests that use this context. TODO: make stop allocating 263 // these objects are required for any of tests that use this context. TODO: make stop allocating
265 // resources in the buffer pools. 264 // resources in the buffer pools.
266 fDrawingMgr.abandon(); 265 fDrawingMgr.abandon();
267 } 266 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698