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

Unified Diff: src/gpu/GrInOrderDrawBuffer.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/GrInOrderDrawBuffer.h ('k') | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.cpp
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 82c8840c222c2516ee82b33b1cd40aa42f4bfa29..cb1e741ec44ec704c194403ca782dc13583ccaf9 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -10,11 +10,11 @@
#include "GrDefaultGeoProcFactory.h"
#include "GrTemplates.h"
-GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrGpu* gpu,
+GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrContext* context,
GrVertexBufferAllocPool* vertexPool,
GrIndexBufferAllocPool* indexPool)
- : INHERITED(gpu, vertexPool, indexPool)
- , fCommands(gpu, vertexPool, indexPool)
+ : INHERITED(context, vertexPool, indexPool)
+ , fCommands(context->getGpu(), vertexPool, indexPool)
, fPathIndexBuffer(kPathIdxBufferMinReserve * sizeof(char)/4)
, fPathTransformBuffer(kPathXformBufferMinReserve * sizeof(float)/4)
, fDrawID(0) {
@@ -376,14 +376,13 @@ void GrInOrderDrawBuffer::onFlush() {
++fDrawID;
}
-bool GrInOrderDrawBuffer::onCopySurface(GrSurface* dst,
+void GrInOrderDrawBuffer::onCopySurface(GrSurface* dst,
GrSurface* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint) {
- GrTargetCommands::Cmd* cmd = fCommands.recordCopySurface(this, dst, src,
- srcRect, dstPoint);
+ SkASSERT(this->getGpu()->canCopySurface(dst, src, srcRect, dstPoint));
+ GrTargetCommands::Cmd* cmd = fCommands.recordCopySurface(dst, src, srcRect, dstPoint);
this->recordTraceMarkersIfNecessary(cmd);
- return SkToBool(cmd);
}
void GrInOrderDrawBuffer::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd* cmd) {
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698