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

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

Issue 1888473002: Use transfer buffer for BatchAtlas texture copies Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT Created 4 years, 2 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/vk/GrVkGpu.cpp ('k') | no next file » | 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 GrGpuCommandBuffer* createCommandBuffer(GrRenderTarget* target, 313 GrGpuCommandBuffer* createCommandBuffer(GrRenderTarget* target,
314 const GrGpuCommandBuffer::LoadAndSto reInfo&, 314 const GrGpuCommandBuffer::LoadAndSto reInfo&,
315 const GrGpuCommandBuffer::LoadAndSto reInfo&) override { 315 const GrGpuCommandBuffer::LoadAndSto reInfo&) override {
316 return nullptr; 316 return nullptr;
317 } 317 }
318 318
319 void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override {} 319 void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override {}
320 320
321 GrFence SK_WARN_UNUSED_RESULT insertFence() const override { return 0; }
322 bool waitFence(GrFence) const override { return true; }
323 void deleteFence(GrFence) const override {}
324
321 private: 325 private:
322 void onResetContext(uint32_t resetBits) override {} 326 void onResetContext(uint32_t resetBits) override {}
323 327
324 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {} 328 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {}
325 329
326 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, 330 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
327 const SkTArray<GrMipLevel>& texels) override { 331 const SkTArray<GrMipLevel>& texels) override {
328 return nullptr; 332 return nullptr;
329 } 333 }
330 334
(...skipping 27 matching lines...) Expand all
358 size_t rowBytes) override { 362 size_t rowBytes) override {
359 return false; 363 return false;
360 } 364 }
361 365
362 bool onWritePixels(GrSurface* surface, 366 bool onWritePixels(GrSurface* surface,
363 int left, int top, int width, int height, 367 int left, int top, int width, int height,
364 GrPixelConfig config, const SkTArray<GrMipLevel>& texels) override { 368 GrPixelConfig config, const SkTArray<GrMipLevel>& texels) override {
365 return false; 369 return false;
366 } 370 }
367 371
368 bool onTransferPixels(GrSurface* surface, 372 bool onTransferPixels(GrTexture* texture,
369 int left, int top, int width, int height, 373 int left, int top, int width, int height,
370 GrPixelConfig config, GrBuffer* transferBuffer, 374 GrPixelConfig config, GrBuffer* transferBuffer,
371 size_t offset, size_t rowBytes) override { 375 size_t offset, size_t rowBytes) override {
372 return false; 376 return false;
373 } 377 }
374 378
375 void onResolveRenderTarget(GrRenderTarget* target) override { return; } 379 void onResolveRenderTarget(GrRenderTarget* target) override { return; }
376 380
377 GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTa rget*, 381 GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTa rget*,
378 int width, 382 int width,
(...skipping 26 matching lines...) Expand all
405 SkASSERT(nullptr == fGpu); 409 SkASSERT(nullptr == fGpu);
406 fGpu = new MockGpu(this, options); 410 fGpu = new MockGpu(this, options);
407 SkASSERT(fGpu); 411 SkASSERT(fGpu);
408 this->initCommon(options); 412 this->initCommon(options);
409 413
410 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 414 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
411 // these objects are required for any of tests that use this context. TODO: make stop allocating 415 // these objects are required for any of tests that use this context. TODO: make stop allocating
412 // resources in the buffer pools. 416 // resources in the buffer pools.
413 fDrawingManager->abandon(); 417 fDrawingManager->abandon();
414 } 418 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698