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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 628633003: gl programs rewrite (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: build fix Created 6 years, 2 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/GrDrawState.cpp ('k') | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index dd2224bdbdd49f8cd5f5dde6ee331245a512cc68..552314bca352f634879991bcfa3247c5340383b3 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -855,6 +855,14 @@ protected:
GrDeviceCoordTexture fDstCopy;
};
+ // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
+ // but couldn't be made. Otherwise, returns true. This method needs to be protected because it
+ // needs to be accessed by GLPrograms to setup a correct drawstate
+ bool setupDstReadIfNecessary(DrawInfo* info) {
+ return this->setupDstReadIfNecessary(&info->fDstCopy, info->getDevBounds());
+ }
+ bool setupDstReadIfNecessary(GrDeviceCoordTexture* dstCopy, const SkRect* drawBounds);
+
private:
// A subclass can optionally overload this function to be notified before
// vertex and index space is reserved.
@@ -913,13 +921,6 @@ private:
void releasePreviousVertexSource();
void releasePreviousIndexSource();
- // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
- // but couldn't be made. Otherwise, returns true.
- bool setupDstReadIfNecessary(DrawInfo* info) {
- return this->setupDstReadIfNecessary(&info->fDstCopy, info->getDevBounds());
- }
- bool setupDstReadIfNecessary(GrDeviceCoordTexture* dstCopy, const SkRect* drawBounds);
-
// Check to see if this set of draw commands has been sent out
virtual bool isIssued(uint32_t drawID) { return true; }
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698