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

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

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Rebasing. Created 4 years, 10 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/GrSurface.cpp ('k') | src/gpu/GrTexture.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 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
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 18 matching lines...) Expand all
365 bool onReadPixels(GrSurface* surface, 365 bool onReadPixels(GrSurface* surface,
366 int left, int top, int width, int height, 366 int left, int top, int width, int height,
367 GrPixelConfig, 367 GrPixelConfig,
368 void* buffer, 368 void* buffer,
369 size_t rowBytes) override { 369 size_t rowBytes) override {
370 return false; 370 return false;
371 } 371 }
372 372
373 bool onWritePixels(GrSurface* surface, 373 bool onWritePixels(GrSurface* surface,
374 int left, int top, int width, int height, 374 int left, int top, int width, int height,
375 GrPixelConfig config, const void* buffer, 375 GrPixelConfig config, const SkTArray<GrMipLevel>& texels) override {
376 size_t rowBytes) override {
377 return false; 376 return false;
378 } 377 }
379 378
380 bool onTransferPixels(GrSurface* surface, 379 bool onTransferPixels(GrSurface* surface,
381 int left, int top, int width, int height, 380 int left, int top, int width, int height,
382 GrPixelConfig config, GrTransferBuffer* buffer, 381 GrPixelConfig config, GrTransferBuffer* buffer,
383 size_t offset, size_t rowBytes) override { 382 size_t offset, size_t rowBytes) override {
384 return false; 383 return false;
385 } 384 }
386 385
(...skipping 30 matching lines...) Expand all
417 SkASSERT(nullptr == fGpu); 416 SkASSERT(nullptr == fGpu);
418 fGpu = new MockGpu(this, options); 417 fGpu = new MockGpu(this, options);
419 SkASSERT(fGpu); 418 SkASSERT(fGpu);
420 this->initCommon(options); 419 this->initCommon(options);
421 420
422 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 421 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
423 // these objects are required for any of tests that use this context. TODO: make stop allocating 422 // these objects are required for any of tests that use this context. TODO: make stop allocating
424 // resources in the buffer pools. 423 // resources in the buffer pools.
425 fDrawingManager->abandon(); 424 fDrawingManager->abandon();
426 } 425 }
OLDNEW
« no previous file with comments | « src/gpu/GrSurface.cpp ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698