OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "GrTest.h" | 8 #include "GrTest.h" |
9 | 9 |
10 #include "GrBatchAtlas.h" | 10 #include "GrBatchAtlas.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 public: | 289 public: |
290 MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(con
text) { | 290 MockGpu(GrContext* context, const GrContextOptions& options) : INHERITED(con
text) { |
291 fCaps.reset(new MockCaps(options)); | 291 fCaps.reset(new MockCaps(options)); |
292 } | 292 } |
293 ~MockGpu() override {} | 293 ~MockGpu() override {} |
294 | 294 |
295 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh
t, size_t rowBytes, | 295 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh
t, size_t rowBytes, |
296 GrPixelConfig readConfig, DrawPreference*, | 296 GrPixelConfig readConfig, DrawPreference*, |
297 ReadPixelTempDrawInfo*) override { return false; } | 297 ReadPixelTempDrawInfo*) override { return false; } |
298 | 298 |
299 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, size
_t rowBytes, | 299 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, |
300 GrPixelConfig srcConfig, DrawPreference*, | 300 GrPixelConfig srcConfig, DrawPreference*, |
301 WritePixelTempDrawInfo*) override { return false;
} | 301 WritePixelTempDrawInfo*) override { return false;
} |
302 | 302 |
303 void buildProgramDesc(GrProgramDesc*, const GrPrimitiveProcessor&, | 303 void buildProgramDesc(GrProgramDesc*, const GrPrimitiveProcessor&, |
304 const GrPipeline&) const override {} | 304 const GrPipeline&) const override {} |
305 | 305 |
306 void discard(GrRenderTarget*) override {} | 306 void discard(GrRenderTarget*) override {} |
307 | 307 |
308 bool onCopySurface(GrSurface* dst, | 308 bool onCopySurface(GrSurface* dst, |
309 GrSurface* src, | 309 GrSurface* src, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 SkASSERT(nullptr == fGpu); | 406 SkASSERT(nullptr == fGpu); |
407 fGpu = new MockGpu(this, options); | 407 fGpu = new MockGpu(this, options); |
408 SkASSERT(fGpu); | 408 SkASSERT(fGpu); |
409 this->initCommon(options); | 409 this->initCommon(options); |
410 | 410 |
411 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 411 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
412 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 412 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
413 // resources in the buffer pools. | 413 // resources in the buffer pools. |
414 fDrawingManager->abandon(); | 414 fDrawingManager->abandon(); |
415 } | 415 } |
OLD | NEW |