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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 321 } |
322 | 322 |
323 void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override {}
; | 323 void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override {}
; |
324 | 324 |
325 private: | 325 private: |
326 void onResetContext(uint32_t resetBits) override {} | 326 void onResetContext(uint32_t resetBits) override {} |
327 | 327 |
328 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {} | 328 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {} |
329 | 329 |
330 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc
le lifeCycle, | 330 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc
le lifeCycle, |
331 const void* srcData, size_t rowBytes) override { | 331 const SkTArray<GrMipLevel>& texels) override { |
332 return nullptr; | 332 return nullptr; |
333 } | 333 } |
334 | 334 |
335 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, GrGpuResourc
e::LifeCycle, | 335 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, GrGpuResourc
e::LifeCycle, |
336 const void* srcData) override { | 336 const SkTArray<GrMipLevel>& texels) ove
rride { |
337 return nullptr; | 337 return nullptr; |
338 } | 338 } |
339 | 339 |
340 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, | 340 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, |
341 GrWrapOwnership) override { return nullptr;
} | 341 GrWrapOwnership) override { return nullptr;
} |
342 | 342 |
343 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, | 343 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, |
344 GrWrapOwnership) override { | 344 GrWrapOwnership) override { |
345 return nullptr; | 345 return nullptr; |
346 } | 346 } |
(...skipping 13 matching lines...) Expand all Loading... |
360 bool onReadPixels(GrSurface* surface, | 360 bool onReadPixels(GrSurface* surface, |
361 int left, int top, int width, int height, | 361 int left, int top, int width, int height, |
362 GrPixelConfig, | 362 GrPixelConfig, |
363 void* buffer, | 363 void* buffer, |
364 size_t rowBytes) override { | 364 size_t rowBytes) override { |
365 return false; | 365 return false; |
366 } | 366 } |
367 | 367 |
368 bool onWritePixels(GrSurface* surface, | 368 bool onWritePixels(GrSurface* surface, |
369 int left, int top, int width, int height, | 369 int left, int top, int width, int height, |
370 GrPixelConfig config, const void* buffer, | 370 GrPixelConfig config, const SkTArray<GrMipLevel>& texels)
override { |
371 size_t rowBytes) override { | |
372 return false; | 371 return false; |
373 } | 372 } |
374 | 373 |
375 bool onTransferPixels(GrSurface* surface, | 374 bool onTransferPixels(GrSurface* surface, |
376 int left, int top, int width, int height, | 375 int left, int top, int width, int height, |
377 GrPixelConfig config, GrTransferBuffer* buffer, | 376 GrPixelConfig config, GrTransferBuffer* buffer, |
378 size_t offset, size_t rowBytes) override { | 377 size_t offset, size_t rowBytes) override { |
379 return false; | 378 return false; |
380 } | 379 } |
381 | 380 |
(...skipping 30 matching lines...) Expand all Loading... |
412 SkASSERT(nullptr == fGpu); | 411 SkASSERT(nullptr == fGpu); |
413 fGpu = new MockGpu(this, options); | 412 fGpu = new MockGpu(this, options); |
414 SkASSERT(fGpu); | 413 SkASSERT(fGpu); |
415 this->initCommon(options); | 414 this->initCommon(options); |
416 | 415 |
417 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 416 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
418 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 417 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
419 // resources in the buffer pools. | 418 // resources in the buffer pools. |
420 fDrawingManager->abandon(); | 419 fDrawingManager->abandon(); |
421 } | 420 } |
OLD | NEW |