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

Unified Diff: skia/ext/benchmarking_canvas.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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 | « skia/ext/analysis_canvas.cc ('k') | skia/ext/bitmap_platform_device_cairo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/benchmarking_canvas.cc
diff --git a/skia/ext/benchmarking_canvas.cc b/skia/ext/benchmarking_canvas.cc
index 64d3f6c43691969cf1eb7a2c6afe32fae528fdac..72541cdd6ce3bea3cf23259e80e3ca10bcc1370d 100644
--- a/skia/ext/benchmarking_canvas.cc
+++ b/skia/ext/benchmarking_canvas.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/time/time.h"
#include "skia/ext/benchmarking_canvas.h"
+#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/utils/SkProxyCanvas.h"
namespace skia {
@@ -24,9 +25,9 @@ class TimingCanvas : public SkProxyCanvas {
public:
TimingCanvas(int width, int height, const BenchmarkingCanvas* track_canvas)
: tracking_canvas_(track_canvas) {
- canvas_ = skia::AdoptRef(SkCanvas::NewRasterN32(width, height));
+ surface_ = skia::AdoptRef(SkSurface::NewRasterPMColor(width, height));
- setProxy(canvas_.get());
+ setProxy(surface_->getCanvas());
}
~TimingCanvas() override {}
@@ -106,13 +107,6 @@ public:
SkProxyCanvas::drawBitmapRectToRect(bitmap, src, dst, paint, flags);
}
- void drawBitmapMatrix(const SkBitmap& bitmap,
- const SkMatrix& m,
- const SkPaint* paint = NULL) override {
- AutoStamper stamper(this);
- SkProxyCanvas::drawBitmapMatrix(bitmap, m, paint);
- }
-
void drawSprite(const SkBitmap& bitmap,
int left,
int top,
@@ -213,7 +207,7 @@ private:
typedef base::hash_map<size_t, base::TimeDelta> TimingsMap;
TimingsMap timings_map_;
- skia::RefPtr<SkCanvas> canvas_;
+ skia::RefPtr<SkSurface> surface_;
friend class AutoStamper;
const BenchmarkingCanvas* tracking_canvas_;
« no previous file with comments | « skia/ext/analysis_canvas.cc ('k') | skia/ext/bitmap_platform_device_cairo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698