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

Side by Side Diff: cc/resources/etc1_pixel_ref.cc

Issue 41903003: cc: Fix incomplete changes to add ETC1 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased and moved pixel ref class to public cc Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/resources/etc1_pixel_ref.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "third_party/skia/include/core/SkPixelRef.h"
9
10 namespace cc {
11
12 // Takes ownership of pixels.
13 ETC1PixelRef::ETC1PixelRef(scoped_ptr<uint8_t[]> pixels)
14 : pixels_(pixels.Pass()) {
15 setImmutable();
16 }
17
18 void* ETC1PixelRef::onLockPixels(SkColorTable** color_table) SK_OVERRIDE {
19 *color_table = NULL;
20 return static_cast<void*>(pixels_.get());
21 }
22
23 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698