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/containers/hash_tables.h" | 5 #include "base/containers/hash_tables.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "skia/ext/benchmarking_canvas.h" | 8 #include "skia/ext/benchmarking_canvas.h" |
9 #include "third_party/skia/include/utils/SkProxyCanvas.h" | 9 #include "third_party/skia/include/utils/SkProxyCanvas.h" |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 AutoStamper stamper(this); | 107 AutoStamper stamper(this); |
108 SkProxyCanvas::drawBitmapMatrix(bitmap, m, paint); | 108 SkProxyCanvas::drawBitmapMatrix(bitmap, m, paint); |
109 } | 109 } |
110 | 110 |
111 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, | 111 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, |
112 const SkPaint* paint = NULL) OVERRIDE { | 112 const SkPaint* paint = NULL) OVERRIDE { |
113 AutoStamper stamper(this); | 113 AutoStamper stamper(this); |
114 SkProxyCanvas::drawSprite(bitmap, left, top, paint); | 114 SkProxyCanvas::drawSprite(bitmap, left, top, paint); |
115 } | 115 } |
116 | 116 |
117 virtual void drawPicture(SkPicture& picture) OVERRIDE { | 117 virtual void drawPicture(const SkPicture* picture) OVERRIDE { |
f(malita)
2014/06/04 15:16:55
Override onDrawPicture() instead.
robertphillips
2014/06/04 15:42:41
Done.
| |
118 AutoStamper stamper(this); | 118 AutoStamper stamper(this); |
119 SkProxyCanvas::drawPicture(picture); | 119 SkProxyCanvas::drawPicture(picture); |
120 } | 120 } |
121 | 121 |
122 virtual void drawVertices(VertexMode vmode, int vertexCount, | 122 virtual void drawVertices(VertexMode vmode, int vertexCount, |
123 const SkPoint vertices[], const SkPoint texs[], | 123 const SkPoint vertices[], const SkPoint texs[], |
124 const SkColor colors[], SkXfermode* xmode, | 124 const SkColor colors[], SkXfermode* xmode, |
125 const uint16_t indices[], int indexCount, | 125 const uint16_t indices[], int indexCount, |
126 const SkPaint& paint) OVERRIDE { | 126 const SkPaint& paint) OVERRIDE { |
127 AutoStamper stamper(this); | 127 AutoStamper stamper(this); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 DCHECK_LT(index, static_cast<size_t>(debug_canvas_->getSize())); | 229 DCHECK_LT(index, static_cast<size_t>(debug_canvas_->getSize())); |
230 return debug_canvas_->getDrawCommandAt(index); | 230 return debug_canvas_->getDrawCommandAt(index); |
231 } | 231 } |
232 | 232 |
233 double BenchmarkingCanvas::GetTime(size_t index) { | 233 double BenchmarkingCanvas::GetTime(size_t index) { |
234 DCHECK_LT(index, static_cast<size_t>(debug_canvas_->getSize())); | 234 DCHECK_LT(index, static_cast<size_t>(debug_canvas_->getSize())); |
235 return timing_canvas_->GetTime(index); | 235 return timing_canvas_->GetTime(index); |
236 } | 236 } |
237 | 237 |
238 } // namespace skia | 238 } // namespace skia |
OLD | NEW |