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

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

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 9 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/GrPathRendering.h ('k') | src/gpu/GrVertices.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 * 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 ~MockGpu() override {} 299 ~MockGpu() override {}
300 300
301 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes, 301 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes,
302 GrPixelConfig readConfig, DrawPreference*, 302 GrPixelConfig readConfig, DrawPreference*,
303 ReadPixelTempDrawInfo*) override { return false; } 303 ReadPixelTempDrawInfo*) override { return false; }
304 304
305 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, 305 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
306 GrPixelConfig srcConfig, DrawPreference*, 306 GrPixelConfig srcConfig, DrawPreference*,
307 WritePixelTempDrawInfo*) override { return false; } 307 WritePixelTempDrawInfo*) override { return false; }
308 308
309 void buildProgramDesc(GrProgramDesc*, const GrPrimitiveProcessor&,
310 const GrPipeline&) const override {}
311
312 void discard(GrRenderTarget*) override {} 309 void discard(GrRenderTarget*) override {}
313 310
314 bool onCopySurface(GrSurface* dst, 311 bool onCopySurface(GrSurface* dst,
315 GrSurface* src, 312 GrSurface* src,
316 const SkIRect& srcRect, 313 const SkIRect& srcRect,
317 const SkIPoint& dstPoint) override { return false; }; 314 const SkIPoint& dstPoint) override { return false; };
318 315
319 void onGetMultisampleSpecs(GrRenderTarget* rt, 316 void onGetMultisampleSpecs(GrRenderTarget* rt,
320 const GrStencilSettings&, 317 const GrStencilSettings&,
321 int* effectiveSampleCnt, 318 int* effectiveSampleCnt,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override { r eturn nullptr; } 357 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override { r eturn nullptr; }
361 358
362 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override { ret urn nullptr; } 359 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override { ret urn nullptr; }
363 360
364 GrTransferBuffer* onCreateTransferBuffer(size_t, TransferType) override { re turn nullptr; } 361 GrTransferBuffer* onCreateTransferBuffer(size_t, TransferType) override { re turn nullptr; }
365 362
366 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override { } 363 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override { }
367 364
368 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override {} 365 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override {}
369 366
370 void onDraw(const DrawArgs&, const GrNonInstancedVertices&) override {} 367 void onDraw(const GrPipeline&,
368 const GrPrimitiveProcessor&,
369 const GrMesh*,
370 int meshCount) override {}
371 371
372 bool onReadPixels(GrSurface* surface, 372 bool onReadPixels(GrSurface* surface,
373 int left, int top, int width, int height, 373 int left, int top, int width, int height,
374 GrPixelConfig, 374 GrPixelConfig,
375 void* buffer, 375 void* buffer,
376 size_t rowBytes) override { 376 size_t rowBytes) override {
377 return false; 377 return false;
378 } 378 }
379 379
380 bool onWritePixels(GrSurface* surface, 380 bool onWritePixels(GrSurface* surface,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 SkASSERT(nullptr == fGpu); 423 SkASSERT(nullptr == fGpu);
424 fGpu = new MockGpu(this, options); 424 fGpu = new MockGpu(this, options);
425 SkASSERT(fGpu); 425 SkASSERT(fGpu);
426 this->initCommon(options); 426 this->initCommon(options);
427 427
428 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 428 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
429 // these objects are required for any of tests that use this context. TODO: make stop allocating 429 // these objects are required for any of tests that use this context. TODO: make stop allocating
430 // resources in the buffer pools. 430 // resources in the buffer pools.
431 fDrawingManager->abandon(); 431 fDrawingManager->abandon();
432 } 432 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathRendering.h ('k') | src/gpu/GrVertices.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698