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

Unified Diff: src/gpu/GrFlushToGpuDrawTarget.cpp

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/GrFlushToGpuDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFlushToGpuDrawTarget.cpp
diff --git a/src/gpu/GrFlushToGpuDrawTarget.cpp b/src/gpu/GrFlushToGpuDrawTarget.cpp
deleted file mode 100644
index 416051d549ea93940abf62613c410b512e2c0d8b..0000000000000000000000000000000000000000
--- a/src/gpu/GrFlushToGpuDrawTarget.cpp
+++ /dev/null
@@ -1,61 +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.
- */
-
-#include "GrFlushToGpuDrawTarget.h"
-#include "GrContext.h"
-#include "GrGpu.h"
-#include "GrBufferAllocPool.h"
-
-GrFlushToGpuDrawTarget::GrFlushToGpuDrawTarget(GrGpu* gpu,
- GrVertexBufferAllocPool* vertexPool,
- GrIndexBufferAllocPool* indexPool)
- : INHERITED(gpu->getContext())
- , fGpu(SkRef(gpu))
- , fVertexPool(vertexPool)
- , fIndexPool(indexPool)
- , fFlushing(false) {
-
- fCaps.reset(SkRef(fGpu->caps()));
-
- SkASSERT(vertexPool);
- SkASSERT(indexPool);
-
-}
-
-void GrFlushToGpuDrawTarget::reset() {
- fVertexPool->reset();
- fIndexPool->reset();
-
- this->onReset();
-}
-
-void GrFlushToGpuDrawTarget::flush() {
- if (fFlushing) {
- return;
- }
- fFlushing = true;
-
- fGpu->saveActiveTraceMarkers();
-
- this->onFlush();
-
- fGpu->restoreActiveTraceMarkers();
-
- fFlushing = false;
- this->reset();
-}
-
-bool GrFlushToGpuDrawTarget::onCanCopySurface(const GrSurface* dst,
- const GrSurface* src,
- const SkIRect& srcRect,
- const SkIPoint& dstPoint) {
- return getGpu()->canCopySurface(dst, src, srcRect, dstPoint);
-}
-
-bool GrFlushToGpuDrawTarget::onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) {
- return getGpu()->initCopySurfaceDstDesc(src, desc);
-}
« no previous file with comments | « src/gpu/GrFlushToGpuDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698