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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: remove errant lines Created 4 years, 6 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/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLGpuCommandBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index d19afaff2e5a39670fa9f27a817a7b38445b0f14..90aa5a659814853a069c031cc10165be679ca14e 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2150,7 +2150,9 @@ void GrGLGpu::disableScissor() {
}
}
-void GrGLGpu::onClear(GrRenderTarget* target, const SkIRect& rect, GrColor color) {
+void GrGLGpu::clear(const SkIRect& rect, GrColor color, GrRenderTarget* target) {
+ this->handleDirtyContext();
+
// parent class should never let us get here with no RT
SkASSERT(target);
GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(target);
@@ -2238,8 +2240,9 @@ void GrGLGpu::clearStencil(GrRenderTarget* target) {
fHWStencilSettings.invalidate();
}
-void GrGLGpu::onClearStencilClip(GrRenderTarget* target, const SkIRect& rect, bool insideClip) {
+void GrGLGpu::clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* target) {
SkASSERT(target);
+ this->handleDirtyContext();
GrStencilAttachment* sb = target->renderTargetPriv().getStencilAttachment();
// this should only be called internally when we know we have a
@@ -2624,11 +2627,10 @@ bool GrGLGpu::onReadPixels(GrSurface* surface,
return true;
}
-GrGpuCommandBuffer* GrGLGpu::createCommandBuffer(const GrRenderTarget& target,
- GrGpuCommandBuffer::LoadAndStoreOp colorOp,
- GrColor colorClear,
- GrGpuCommandBuffer::LoadAndStoreOp stencilOp,
- GrColor stencilClear) {
+GrGpuCommandBuffer* GrGLGpu::createCommandBuffer(
+ GrRenderTarget* target,
+ const GrGpuCommandBuffer::LoadAndStoreInfo& colorInfo,
+ const GrGpuCommandBuffer::LoadAndStoreInfo& stencilInfo) {
return new GrGLGpuCommandBuffer(this);
}
@@ -2729,10 +2731,12 @@ GrGLenum gPrimitiveType2GLMode[] = {
#endif
#endif
-void GrGLGpu::onDraw(const GrPipeline& pipeline,
- const GrPrimitiveProcessor& primProc,
- const GrMesh* meshes,
- int meshCount) {
+void GrGLGpu::draw(const GrPipeline& pipeline,
+ const GrPrimitiveProcessor& primProc,
+ const GrMesh* meshes,
+ int meshCount) {
+ this->handleDirtyContext();
+
if (!this->flushGLState(pipeline, primProc)) {
return;
}
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLGpuCommandBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698