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

Unified Diff: src/gpu/GrRenderTarget.cpp

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 years, 7 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/GrOvalRenderer.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRenderTarget.cpp
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index d539c900f32f78d252da28bfbd8098f798c97b0b..59a7ae5a2a72b73b4ec9f8d908de95370ab80d95 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -10,6 +10,7 @@
#include "GrRenderTarget.h"
#include "GrContext.h"
+#include "GrDrawContext.h"
#include "GrGpu.h"
#include "GrRenderTargetPriv.h"
#include "GrStencilAttachment.h"
@@ -17,10 +18,12 @@
void GrRenderTarget::discard() {
// go through context so that all necessary flushing occurs
GrContext* context = this->getContext();
- if (NULL == context) {
+ GrDrawContext* drawContext = context ? context->drawContext() : NULL;
+ if (!drawContext) {
return;
}
- context->discardRenderTarget(this);
+
+ drawContext->discard(this);
}
void GrRenderTarget::flagAsNeedingResolve(const SkIRect* rect) {
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698