| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // Call drawRect to determine transparency, | 196 // Call drawRect to determine transparency, |
| 197 // but reset solid color to false. | 197 // but reset solid color to false. |
| 198 SkPaint tmpPaint; | 198 SkPaint tmpPaint; |
| 199 if (!paint) | 199 if (!paint) |
| 200 paint = &tmpPaint; | 200 paint = &tmpPaint; |
| 201 drawRect(dst, *paint); | 201 drawRect(dst, *paint); |
| 202 is_solid_color_ = false; | 202 is_solid_color_ = false; |
| 203 ++draw_op_count_; | 203 ++draw_op_count_; |
| 204 } | 204 } |
| 205 | 205 |
| 206 void AnalysisCanvas::drawBitmapMatrix(const SkBitmap& bitmap, | |
| 207 const SkMatrix& matrix, | |
| 208 const SkPaint* paint) { | |
| 209 is_solid_color_ = false; | |
| 210 is_transparent_ = false; | |
| 211 ++draw_op_count_; | |
| 212 } | |
| 213 | |
| 214 void AnalysisCanvas::drawBitmapNine(const SkBitmap& bitmap, | 206 void AnalysisCanvas::drawBitmapNine(const SkBitmap& bitmap, |
| 215 const SkIRect& center, | 207 const SkIRect& center, |
| 216 const SkRect& dst, | 208 const SkRect& dst, |
| 217 const SkPaint* paint) { | 209 const SkPaint* paint) { |
| 218 is_solid_color_ = false; | 210 is_solid_color_ = false; |
| 219 is_transparent_ = false; | 211 is_transparent_ = false; |
| 220 ++draw_op_count_; | 212 ++draw_op_count_; |
| 221 } | 213 } |
| 222 | 214 |
| 223 void AnalysisCanvas::drawSprite(const SkBitmap& bitmap, | 215 void AnalysisCanvas::drawSprite(const SkBitmap& bitmap, |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 force_not_transparent_stack_level_ = kNoLayer; | 445 force_not_transparent_stack_level_ = kNoLayer; |
| 454 } | 446 } |
| 455 } | 447 } |
| 456 | 448 |
| 457 INHERITED::willRestore(); | 449 INHERITED::willRestore(); |
| 458 } | 450 } |
| 459 | 451 |
| 460 } // namespace skia | 452 } // namespace skia |
| 461 | 453 |
| 462 | 454 |
| OLD | NEW |