Revert "Revert "Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."""

This reverts commit 5f035e90d6dea0139a4f204b634e7b7b3b4976d7.

Reverting because it breaks chrome/blink due to new SkPixelRef constructor arg.

BUG=

Review URL: https://codereview.chromium.org/108993002

git-svn-id: http://skia.googlecode.com/svn/trunk@12551 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/image/SkDataPixelRef.cpp b/src/image/SkDataPixelRef.cpp
index 875f933..7897bf9 100644
--- a/src/image/SkDataPixelRef.cpp
+++ b/src/image/SkDataPixelRef.cpp
@@ -9,25 +9,18 @@
 #include "SkData.h"
 #include "SkFlattenableBuffers.h"
 
-SkDataPixelRef::SkDataPixelRef(const SkImageInfo& info,
-                               SkData* data, size_t rowBytes)
-    : INHERITED(info)
-    , fData(data)
-    , fRB(rowBytes) 
-{
+SkDataPixelRef::SkDataPixelRef(SkData* data) : fData(data) {
     fData->ref();
-    this->setPreLocked(const_cast<void*>(fData->data()), rowBytes, NULL);
+    this->setPreLocked(const_cast<void*>(fData->data()), NULL);
 }
 
 SkDataPixelRef::~SkDataPixelRef() {
     fData->unref();
 }
 
-bool SkDataPixelRef::onNewLockPixels(LockRec* rec) {
-    rec->fPixels = const_cast<void*>(fData->data());
-    rec->fColorTable = NULL;
-    rec->fRowBytes = fRB;
-    return true;
+void* SkDataPixelRef::onLockPixels(SkColorTable** ct) {
+    *ct = NULL;
+    return const_cast<void*>(fData->data());
 }
 
 void SkDataPixelRef::onUnlockPixels() {
@@ -40,15 +33,11 @@
 
 void SkDataPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const {
     this->INHERITED::flatten(buffer);
-    
     buffer.writeDataAsByteArray(fData);
-    buffer.write32(fRB);
 }
 
 SkDataPixelRef::SkDataPixelRef(SkFlattenableReadBuffer& buffer)
-    : INHERITED(buffer, NULL)
-{
+        : INHERITED(buffer, NULL) {
     fData = buffer.readByteArrayAsData();
-    fRB = buffer.read32();
-    this->setPreLocked(const_cast<void*>(fData->data()), fRB, NULL);
+    this->setPreLocked(const_cast<void*>(fData->data()), NULL);
 }