OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/debug/trace_event.h" | 5 #include "base/debug/trace_event.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "skia/ext/analysis_canvas.h" | 7 #include "skia/ext/analysis_canvas.h" |
8 #include "third_party/skia/include/core/SkDraw.h" | 8 #include "third_party/skia/include/core/SkDraw.h" |
9 #include "third_party/skia/include/core/SkRRect.h" | 9 #include "third_party/skia/include/core/SkRRect.h" |
10 #include "third_party/skia/include/core/SkShader.h" | 10 #include "third_party/skia/include/core/SkShader.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 } | 207 } |
208 | 208 |
209 void AnalysisCanvas::drawSprite(const SkBitmap& bitmap, | 209 void AnalysisCanvas::drawSprite(const SkBitmap& bitmap, |
210 int left, | 210 int left, |
211 int top, | 211 int top, |
212 const SkPaint* paint) { | 212 const SkPaint* paint) { |
213 is_solid_color_ = false; | 213 is_solid_color_ = false; |
214 is_transparent_ = false; | 214 is_transparent_ = false; |
215 } | 215 } |
216 | 216 |
217 void AnalysisCanvas::drawText(const void* text, | 217 void AnalysisCanvas::onDrawText(const void* text, |
218 size_t len, | 218 size_t len, |
219 SkScalar x, | 219 SkScalar x, |
220 SkScalar y, | 220 SkScalar y, |
221 const SkPaint& paint) { | 221 const SkPaint& paint) { |
222 is_solid_color_ = false; | 222 is_solid_color_ = false; |
223 is_transparent_ = false; | 223 is_transparent_ = false; |
224 has_text_ = true; | 224 has_text_ = true; |
225 } | 225 } |
226 | 226 |
227 void AnalysisCanvas::drawPosText(const void* text, | 227 void AnalysisCanvas::onDrawPosText(const void* text, |
228 size_t byteLength, | 228 size_t byteLength, |
229 const SkPoint pos[], | 229 const SkPoint pos[], |
230 const SkPaint& paint) { | 230 const SkPaint& paint) { |
231 is_solid_color_ = false; | 231 is_solid_color_ = false; |
232 is_transparent_ = false; | 232 is_transparent_ = false; |
233 has_text_ = true; | 233 has_text_ = true; |
234 } | 234 } |
235 | 235 |
236 void AnalysisCanvas::drawPosTextH(const void* text, | 236 void AnalysisCanvas::onDrawPosTextH(const void* text, |
237 size_t byteLength, | 237 size_t byteLength, |
238 const SkScalar xpos[], | 238 const SkScalar xpos[], |
239 SkScalar constY, | 239 SkScalar constY, |
240 const SkPaint& paint) { | 240 const SkPaint& paint) { |
241 is_solid_color_ = false; | 241 is_solid_color_ = false; |
242 is_transparent_ = false; | 242 is_transparent_ = false; |
243 has_text_ = true; | 243 has_text_ = true; |
244 } | 244 } |
245 | 245 |
246 void AnalysisCanvas::drawTextOnPath(const void* text, | 246 void AnalysisCanvas::onDrawTextOnPath(const void* text, |
247 size_t len, | 247 size_t len, |
248 const SkPath& path, | 248 const SkPath& path, |
249 const SkMatrix* matrix, | 249 const SkMatrix* matrix, |
250 const SkPaint& paint) { | 250 const SkPaint& paint) { |
251 is_solid_color_ = false; | 251 is_solid_color_ = false; |
252 is_transparent_ = false; | 252 is_transparent_ = false; |
253 has_text_ = true; | 253 has_text_ = true; |
254 } | 254 } |
255 | 255 |
256 void AnalysisCanvas::drawVertices(SkCanvas::VertexMode, | 256 void AnalysisCanvas::drawVertices(SkCanvas::VertexMode, |
257 int vertex_count, | 257 int vertex_count, |
258 const SkPoint verts[], | 258 const SkPoint verts[], |
259 const SkPoint texs[], | 259 const SkPoint texs[], |
260 const SkColor colors[], | 260 const SkColor colors[], |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 force_not_transparent_stack_level_ = kNoLayer; | 406 force_not_transparent_stack_level_ = kNoLayer; |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 INHERITED::willRestore(); | 410 INHERITED::willRestore(); |
411 } | 411 } |
412 | 412 |
413 } // namespace skia | 413 } // namespace skia |
414 | 414 |
415 | 415 |
OLD | NEW |