diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 20:21:52 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 20:21:52 +0000 |
commit | e758a237f0bc81a78dddcc349e503332c5469439 (patch) | |
tree | 26db032ad9cf4bf7f10217d2741685373d498ea8 /skia/ext/benchmarking_canvas.cc | |
parent | 864b73c7621db7180fc6a693cf353f8c49a7348e (diff) | |
download | chromium_src-e758a237f0bc81a78dddcc349e503332c5469439.zip chromium_src-e758a237f0bc81a78dddcc349e503332c5469439.tar.gz chromium_src-e758a237f0bc81a78dddcc349e503332c5469439.tar.bz2 |
don't create SkDevice directly, use SkBitmap or (better) SkCanvas::NewRaster factory
BUG=skia:2239
TBR=scherkus@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254567
reopened (after revewer) to address media_unittest valgrind issue
Review URL: https://codereview.chromium.org/184743002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/benchmarking_canvas.cc')
-rw-r--r-- | skia/ext/benchmarking_canvas.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/skia/ext/benchmarking_canvas.cc b/skia/ext/benchmarking_canvas.cc index d2a2b3a..a0bb8a0 100644 --- a/skia/ext/benchmarking_canvas.cc +++ b/skia/ext/benchmarking_canvas.cc @@ -6,7 +6,6 @@ #include "base/logging.h" #include "base/time/time.h" #include "skia/ext/benchmarking_canvas.h" -#include "third_party/skia/include/core/SkBitmapDevice.h" #include "third_party/skia/include/utils/SkProxyCanvas.h" namespace skia { @@ -25,9 +24,7 @@ class TimingCanvas : public SkProxyCanvas { public: TimingCanvas(int width, int height, const BenchmarkingCanvas* track_canvas) : tracking_canvas_(track_canvas) { - skia::RefPtr<SkBaseDevice> device = skia::AdoptRef( - SkNEW_ARGS(SkBitmapDevice, (SkBitmap::kARGB_8888_Config, width, height))); - canvas_ = skia::AdoptRef(SkNEW_ARGS(SkCanvas, (device.get()))); + canvas_ = skia::AdoptRef(SkCanvas::NewRasterN32(width, height)); setProxy(canvas_.get()); } |