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

Unified Diff: chrome/common/security_filter_peer.cc

Issue 18347: Add a PNGEncoder helper function that takes an SkBitmap, (Closed)
Patch Set: Test2 Created 11 years, 11 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 | « chrome/browser/webdata/web_database.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/security_filter_peer.cc
diff --git a/chrome/common/security_filter_peer.cc b/chrome/common/security_filter_peer.cc
old mode 100644
new mode 100755
index 58db3ee11a68f6b484ef7429321fe80a2bacde78..e984bc4d82153ca686618b5f3464a4fac329571b
--- a/chrome/common/security_filter_peer.cc
+++ b/chrome/common/security_filter_peer.cc
@@ -298,13 +298,8 @@ bool ImageFilterPeer::DataReady() {
// Now encode it to a PNG.
std::vector<unsigned char> output;
- unsigned char* input =
- static_cast<unsigned char*>(canvas.getDevice()->accessBitmap(false).
- getPixels());
- if (!PNGEncoder::Encode(input,
- PNGEncoder::FORMAT_BGRA,
- image.width(), image.height(),
- image.width() * 4, false, &output)) {
+ if (!PNGEncoder::EncodeBGRASkBitmap(canvas.getDevice()->accessBitmap(false),
+ false, &output)) {
return false;
}
« no previous file with comments | « chrome/browser/webdata/web_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698