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

Unified Diff: src/gpu/GrFlushToGpuDrawTarget.h

Issue 1117433002: Remove GrFlushToGpuDrawTarget and move functionality up to GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrFlushToGpuDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFlushToGpuDrawTarget.h
diff --git a/src/gpu/GrFlushToGpuDrawTarget.h b/src/gpu/GrFlushToGpuDrawTarget.h
deleted file mode 100644
index b379f2e0a73e97c8c0bfa6776eddb5f636bf5b9d..0000000000000000000000000000000000000000
--- a/src/gpu/GrFlushToGpuDrawTarget.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrFlushToGpuDrawTarget_DEFINED
-#define GrFlushToGpuDrawTarget_DEFINED
-
-#include "GrDrawTarget.h"
-
-class GrIndexBufferAllocPool;
-class GrVertexBufferAllocPool;
-class GrGpu;
-
-/**
- * Base class for draw targets that accumulate index and vertex data in buffers for deferred.
- * When draw target clients reserve geometry this subclass will place that geometry into
- * preallocated vertex/index buffers in the order the requests are made (assuming the requests fit
- * in the preallocated buffers).
- */
-class GrFlushToGpuDrawTarget : public GrClipTarget {
-public:
- GrFlushToGpuDrawTarget(GrGpu*, GrVertexBufferAllocPool*,GrIndexBufferAllocPool*);
-
- /**
- * Empties the draw buffer of any queued up draws. This must not be called while inside an
- * unbalanced pushGeometrySource().
- */
- void reset();
-
- /**
- * This plays any queued up draws to its GrGpu target. It also resets this object (i.e. flushing
- * is destructive). This buffer must not have an active reserved vertex or index source. Any
- * reserved geometry on the target will be finalized because it's geometry source will be pushed
- * before flushing and popped afterwards.
- */
- void flush();
-
-protected:
- GrGpu* getGpu() { return fGpu; }
- const GrGpu* getGpu() const{ return fGpu; }
-
- GrVertexBufferAllocPool* getVertexAllocPool() { return fVertexPool; }
- GrIndexBufferAllocPool* getIndexAllocPool() { return fIndexPool; }
-
-private:
- virtual void onReset() = 0;
-
- virtual void onFlush() = 0;
-
- bool onCanCopySurface(const GrSurface* dst,
- const GrSurface* src,
- const SkIRect& srcRect,
- const SkIPoint& dstPoint) override;
- bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) override;
-
- SkAutoTUnref<GrGpu> fGpu;
- GrVertexBufferAllocPool* fVertexPool;
- GrIndexBufferAllocPool* fIndexPool;
- bool fFlushing;
-
- typedef GrClipTarget INHERITED;
-};
-
-#endif
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrFlushToGpuDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698