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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/skia/ImagePixelLocker.h

Issue 1813483002: ImagePixelLocker now manually allocates SkPixmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ImagePixelLocker_h 5 #ifndef ImagePixelLocker_h
6 #define ImagePixelLocker_h 6 #define ImagePixelLocker_h
7 7
8 #include "platform/heap/Heap.h" 8 #include "platform/heap/Heap.h"
9 #include "third_party/skia/include/core/SkImageInfo.h" 9 #include "third_party/skia/include/core/SkImageInfo.h"
10 #include "third_party/skia/include/core/SkPixmap.h" 10 #include "third_party/skia/include/core/SkPixmap.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
13 #include "wtf/PassRefPtr.h" 13 #include "wtf/PassRefPtr.h"
14 #include "wtf/RefPtr.h" 14 #include "wtf/RefPtr.h"
15 15
16 class SkImage; 16 class SkImage;
17 17
18 namespace blink { 18 namespace blink {
19 19
20 class ImagePixelLocker final { 20 class ImagePixelLocker final {
21 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 21 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
22 WTF_MAKE_NONCOPYABLE(ImagePixelLocker); 22 WTF_MAKE_NONCOPYABLE(ImagePixelLocker);
23 public: 23 public:
24 ImagePixelLocker(PassRefPtr<const SkImage>, SkAlphaType, SkColorType); 24 ImagePixelLocker(PassRefPtr<const SkImage>, SkAlphaType, SkColorType);
25 ~ImagePixelLocker();
25 26
26 const void* pixels() const { return m_pixels; } 27 const void* pixels() const { return m_pixels; }
27 28
28 private: 29 private:
29 const RefPtr<const SkImage> m_image; 30 const RefPtr<const SkImage> m_image;
30 const void* m_pixels; 31 const void* m_pixels;
31 SkAutoPixmapStorage m_pixelStorage; 32 SkPixmap m_pixelStorage;
f(malita) 2016/03/16 19:28:29 Let's rename this to m_pixmap.
robertphillips 2016/03/16 19:59:10 It is actually back to being more of a pure pixel
32 }; 33 };
33 34
34 } // namespace blink 35 } // namespace blink
35 36
36 #endif 37 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698