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

Unified Diff: src/gpu/GrGpu.cpp

Issue 777673003: move program descriptor generation to flush (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 6 years 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
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index d97809f9520c671b9cfbc974858a78d938255a50..63d63ad7002759de9f7132769b6e75315ef84105 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -275,20 +275,23 @@ const GrIndexBuffer* GrGpu::getQuadIndexBuffer() const {
////////////////////////////////////////////////////////////////////////////////
-void GrGpu::draw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& info) {
+void GrGpu::draw(const GrOptDrawState& ds,
+ const GrProgramDesc& desc,
+ const GrDrawTarget::DrawInfo& info) {
this->handleDirtyContext();
- if (!this->flushGraphicsState(ds, PrimTypeToDrawType(info.primitiveType()))) {
+ if (!this->flushGraphicsState(ds, desc, PrimTypeToDrawType(info.primitiveType()))) {
return;
}
this->onDraw(ds, info);
}
void GrGpu::stencilPath(const GrOptDrawState& ds,
+ const GrProgramDesc& desc,
const GrPath* path,
const GrStencilSettings& stencilSettings) {
this->handleDirtyContext();
- if (!this->flushGraphicsState(ds, kStencilPath_DrawType)) {
+ if (!this->flushGraphicsState(ds, desc, kStencilPath_DrawType)) {
return;
}
@@ -297,11 +300,12 @@ void GrGpu::stencilPath(const GrOptDrawState& ds,
void GrGpu::drawPath(const GrOptDrawState& ds,
+ const GrProgramDesc& desc,
const GrPath* path,
const GrStencilSettings& stencilSettings) {
this->handleDirtyContext();
- if (!this->flushGraphicsState(ds, kDrawPath_DrawType)) {
+ if (!this->flushGraphicsState(ds, desc, kDrawPath_DrawType)) {
return;
}
@@ -309,6 +313,7 @@ void GrGpu::drawPath(const GrOptDrawState& ds,
}
void GrGpu::drawPaths(const GrOptDrawState& ds,
+ const GrProgramDesc& desc,
const GrPathRange* pathRange,
const void* indices,
GrDrawTarget::PathIndexType indexType,
@@ -318,7 +323,7 @@ void GrGpu::drawPaths(const GrOptDrawState& ds,
const GrStencilSettings& stencilSettings) {
this->handleDirtyContext();
- if (!this->flushGraphicsState(ds, kDrawPaths_DrawType)) {
+ if (!this->flushGraphicsState(ds, desc, kDrawPaths_DrawType)) {
return;
}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | src/gpu/GrInOrderDrawBuffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698