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

Unified Diff: trunk/src/skia/tools/filter_fuzz_stub/filter_fuzz_stub.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
« no previous file with comments | « trunk/src/skia/ext/benchmarking_canvas.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
===================================================================
--- trunk/src/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc (revision 254711)
+++ trunk/src/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc (working copy)
@@ -4,6 +4,7 @@
#include "base/file_util.h"
#include "base/logging.h"
+#include "third_party/skia/include/core/SkBitmapDevice.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkFlattenableSerialization.h"
#include "third_party/skia/include/core/SkImageFilter.h"
@@ -73,8 +74,10 @@
int ret = 0;
SkBitmap bitmap;
- bitmap.allocN32Pixels(BitmapSize, BitmapSize);
- SkCanvas canvas(bitmap);
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, BitmapSize, BitmapSize);
+ bitmap.allocPixels();
+ SkBitmapDevice device(bitmap);
+ SkCanvas canvas(&device);
canvas.clear(0x00000000);
for (int i = 1; i < argc; i++)
« no previous file with comments | « trunk/src/skia/ext/benchmarking_canvas.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698