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

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

Issue 138393002: replace etc1_pixel_ref with skia version (SkMallocPixelRef) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 #ifndef CC_RESOURCES_ETC1_PIXEL_REF_H_
6 #define CC_RESOURCES_ETC1_PIXEL_REF_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "cc/base/cc_export.h"
12 #include "third_party/skia/include/core/SkPixelRef.h"
13
14 namespace cc {
15
16 class CC_EXPORT ETC1PixelRef : public SkPixelRef {
17 public:
18 // Takes ownership of pixels.
19 ETC1PixelRef(const SkImageInfo& info, size_t rowBytes,
20 scoped_ptr<uint8_t[]> pixels);
21 virtual ~ETC1PixelRef();
22
23 // SK_DECLARE_UNFLATTENABLE_OBJECT
24 virtual Factory getFactory() const OVERRIDE;
25
26 protected:
27 // Implementation of SkPixelRef.
28 #ifdef SK_SUPPORT_LEGACY_ONLOCKPIXELS
29 virtual void* onLockPixels(SkColorTable** color_table) OVERRIDE;
30 #endif
31 virtual bool onNewLockPixels(LockRec* rec) OVERRIDE;
32 virtual void onUnlockPixels() OVERRIDE;
33
34 private:
35 size_t rowBytes_;
36 scoped_ptr<uint8_t[]> pixels_;
37
38 DISALLOW_COPY_AND_ASSIGN(ETC1PixelRef);
39 };
40
41 } // namespace cc
42
43 #endif // CC_RESOURCES_ETC1_PIXEL_REF_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/resources/etc1_pixel_ref.cc » ('j') | cc/resources/ui_resource_bitmap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698