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

Side by Side Diff: src/views/animated/SkStaticTextView.cpp

Issue 21949007: Remove operator== from SkPaint (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Static function Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkPaint.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkWidgetViews.h" 8 #include "SkWidgetViews.h"
9 #include "SkTextBox.h" 9 #include "SkTextBox.h"
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 void SkStaticTextView::getPaint(SkPaint* paint) const 120 void SkStaticTextView::getPaint(SkPaint* paint) const
121 { 121 {
122 if (paint) 122 if (paint)
123 *paint = fPaint; 123 *paint = fPaint;
124 } 124 }
125 125
126 void SkStaticTextView::setPaint(const SkPaint& paint) 126 void SkStaticTextView::setPaint(const SkPaint& paint)
127 { 127 {
128 if (fPaint != paint) 128 fPaint = paint;
129 { 129 this->computeSize();
130 fPaint = paint; 130 this->inval(NULL);
131 this->computeSize();
132 this->inval(NULL);
133 }
134 } 131 }
135 132
136 void SkStaticTextView::onDraw(SkCanvas* canvas) 133 void SkStaticTextView::onDraw(SkCanvas* canvas)
137 { 134 {
138 this->INHERITED::onDraw(canvas); 135 this->INHERITED::onDraw(canvas);
139 136
140 if (fText.isEmpty()) 137 if (fText.isEmpty())
141 return; 138 return;
142 139
143 SkTextBox box; 140 SkTextBox box;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 (node = dom.getFirstChild(node, "screenplay")) != NULL) 179 (node = dom.getFirstChild(node, "screenplay")) != NULL)
183 { 180 {
184 // FIXME: Including inflate_paint causes Windows build to fail -- it complains 181 // FIXME: Including inflate_paint causes Windows build to fail -- it complains
185 // that SKListView::SkListView is undefined. 182 // that SKListView::SkListView is undefined.
186 #if 0 183 #if 0
187 inflate_paint(dom, node, &fPaint); 184 inflate_paint(dom, node, &fPaint);
188 #endif 185 #endif
189 } 186 }
190 } 187 }
191 } 188 }
OLDNEW
« no previous file with comments | « src/core/SkPaint.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698