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

Unified Diff: trunk/src/skia/ext/benchmarking_canvas.cc

Issue 183003011: Revert 254567 "don't create SkDevice directly, use SkBitmap or (..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 months 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
Index: trunk/src/skia/ext/benchmarking_canvas.cc
===================================================================
--- trunk/src/skia/ext/benchmarking_canvas.cc (revision 254711)
+++ trunk/src/skia/ext/benchmarking_canvas.cc (working copy)
@@ -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/SkBitmapDevice.h"
#include "third_party/skia/include/utils/SkProxyCanvas.h"
namespace skia {
@@ -24,7 +25,9 @@
public:
TimingCanvas(int width, int height, const BenchmarkingCanvas* track_canvas)
: tracking_canvas_(track_canvas) {
- canvas_ = skia::AdoptRef(SkCanvas::NewRasterN32(width, height));
+ skia::RefPtr<SkBaseDevice> device = skia::AdoptRef(
+ SkNEW_ARGS(SkBitmapDevice, (SkBitmap::kARGB_8888_Config, width, height)));
+ canvas_ = skia::AdoptRef(SkNEW_ARGS(SkCanvas, (device.get())));
setProxy(canvas_.get());
}
« no previous file with comments | « trunk/src/media/filters/skcanvas_video_renderer_unittest.cc ('k') | trunk/src/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698