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

Issue 243483002: Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead. (Closed)

Created:
6 years, 8 months ago by hal.canary
Modified:
6 years, 8 months ago
Reviewers:
scroggo, mtklein, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead. Committed: http://code.google.com/p/skia/source/detail?r=14289

Patch Set 1 #

Patch Set 2 : AnotherPatchSet #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -15 lines) Patch
M dm/DMWriteTask.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M include/core/SkMallocPixelRef.h View 2 chunks +1 line, -5 lines 0 comments Download
M src/core/SkMallocPixelRef.cpp View 2 chunks +4 lines, -6 lines 0 comments Download
M tests/MallocPixelRefTest.cpp View 1 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
hal.canary
This came up in the discussions around https://codereview.chromium.org/197873039/ .
6 years, 8 months ago (2014-04-18 18:03:16 UTC) #1
reed1
lgtm
6 years, 8 months ago (2014-04-18 18:04:59 UTC) #2
scroggo
lgtm
6 years, 8 months ago (2014-04-18 18:52:19 UTC) #3
hal.canary
The CQ bit was checked by halcanary@google.com
6 years, 8 months ago (2014-04-21 21:07:56 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/halcanary@google.com/243483002/20001
6 years, 8 months ago (2014-04-21 21:08:06 UTC) #5
commit-bot: I haz the power
Change committed as 14289
6 years, 8 months ago (2014-04-21 21:08:19 UTC) #6
commit-bot: I haz the power
6 years, 8 months ago (2014-04-21 21:08:30 UTC) #7
Message was sent while issue was closed.
Failed to apply patch for dm/DMWriteTask.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file dm/DMWriteTask.cpp
  Hunk #1 FAILED at 84.
  1 out of 1 hunk FAILED -- saving rejects to file dm/DMWriteTask.cpp.rej

Patch:       dm/DMWriteTask.cpp
Index: dm/DMWriteTask.cpp
diff --git a/dm/DMWriteTask.cpp b/dm/DMWriteTask.cpp
index
890a4bb052b719e096fd51bd15eb2212a22ce6b6..f7fa014ea45880a78ab9dd66d43b80ccc8750a4b
100644
--- a/dm/DMWriteTask.cpp
+++ b/dm/DMWriteTask.cpp
@@ -84,8 +84,11 @@ struct PngAndRaw {
         }
 
         const size_t offset = data->size() - bitmapBytes;
+        SkAutoTUnref<SkData> subset(
+                SkData::NewSubset(data, offset, bitmapBytes));
         SkAutoTUnref<SkPixelRef> pixels(
-            SkMallocPixelRef::NewWithData(info, rowBytes, NULL/*ctable*/, data,
offset));
+            SkMallocPixelRef::NewWithData(
+                    info, rowBytes, NULL/*ctable*/, subset));
         SkASSERT(pixels);
 
         bitmap->setConfig(info, rowBytes);

Powered by Google App Engine
This is Rietveld 408576698