| Index: cc/resources/etc1_pixel_ref.cc
|
| diff --git a/cc/resources/etc1_pixel_ref.cc b/cc/resources/etc1_pixel_ref.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c77e2e5c8f5f1644020f219dd2ccd3ffad74719d
|
| --- /dev/null
|
| +++ b/cc/resources/etc1_pixel_ref.cc
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "cc/resources/etc1_pixel_ref.h"
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "third_party/skia/include/core/SkPixelRef.h"
|
| +
|
| +namespace cc {
|
| +
|
| +// Takes ownership of pixels.
|
| +ETC1PixelRef::ETC1PixelRef(scoped_ptr<uint8_t[]> pixels)
|
| + : pixels_(pixels.Pass()) {
|
| + setImmutable();
|
| +}
|
| +
|
| +void* ETC1PixelRef::onLockPixels(SkColorTable** color_table) SK_OVERRIDE {
|
| + *color_table = NULL;
|
| + return static_cast<void*>(pixels_.get());
|
| +}
|
| +
|
| +} // namespace cc
|
|
|