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

Unified Diff: Source/platform/graphics/GraphicsContext.h

Issue 311193009: Replace GraphicsContext::setupPaintFor* with const getters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « Source/platform/fonts/mac/FontMac.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.h
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
index a0a0572a6baabdaf253d9f0bebfed763e9df81d1..768d86ee9e383af4110b1ab5e2e11e440292a570 100644
--- a/Source/platform/graphics/GraphicsContext.h
+++ b/Source/platform/graphics/GraphicsContext.h
@@ -239,11 +239,11 @@ public:
// Get the contents of the image buffer
bool readPixels(const SkImageInfo&, void* pixels, size_t rowBytes, int x, int y);
- // Sets up the paint for the current fill style.
- void setupPaintForFilling(SkPaint*) const;
+ // Get the current fill style.
+ const SkPaint& fillPaint() const { return immutableState()->fillPaint(); }
- // Sets up the paint for the current stroke style.
- void setupPaintForStroking(SkPaint*) const;
+ // Get the current stroke style.
+ const SkPaint& strokePaint() const { return immutableState()->strokePaint(); }
// These draw methods will do both stroking and filling.
// FIXME: ...except drawRect(), which fills properly but always strokes
@@ -454,9 +454,6 @@ private:
void concat(const SkMatrix&);
- // common code between setupPaintFor[Filling,Stroking]
- void setupShader(SkPaint*, Gradient*, Pattern*, SkColor) const;
-
// Apply deferred paint state saves
void realizePaintSave()
{
« no previous file with comments | « Source/platform/fonts/mac/FontMac.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698