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

Unified Diff: content/shell/renderer/test_runner/TestPlugin.cpp

Issue 363933002: setConfig is deprecated, use setInfo or allocPixels instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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: content/shell/renderer/test_runner/TestPlugin.cpp
diff --git a/content/shell/renderer/test_runner/TestPlugin.cpp b/content/shell/renderer/test_runner/TestPlugin.cpp
index 22f56f5ad3d5035833e6e524b9f5acfd01ebb792..49606d54cf315e35d1ae65725e4acac6108d91a3 100644
--- a/content/shell/renderer/test_runner/TestPlugin.cpp
+++ b/content/shell/renderer/test_runner/TestPlugin.cpp
@@ -429,9 +429,10 @@ void TestPlugin::drawSceneSoftware(void* memory, size_t bytes) {
m_scene.backgroundColor[1],
m_scene.backgroundColor[2]);
+ const SkImageInfo info = SkImageInfo::MakeN32Premul(m_rect.width,
+ m_rect.height);
SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, m_rect.width, m_rect.height);
- bitmap.setPixels(memory);
+ bitmap.installPixels(info, memory, info.minRowBytes());
SkCanvas canvas(bitmap);
canvas.clear(backgroundColor);

Powered by Google App Engine
This is Rietveld 408576698