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

Unified Diff: src/core/SkLinearBitmapPipeline.h

Issue 2474073002: Revert of Try to use only std::aligned_storage. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPostConfig.h ('k') | src/core/SkSmallAllocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLinearBitmapPipeline.h
diff --git a/src/core/SkLinearBitmapPipeline.h b/src/core/SkLinearBitmapPipeline.h
index d9fa97522ef6b04c2fde05e9bdc7c435c5cbebcf..91b573df5d8c5a95de93ff3b31a5c82741633c57 100644
--- a/src/core/SkLinearBitmapPipeline.h
+++ b/src/core/SkLinearBitmapPipeline.h
@@ -57,9 +57,6 @@
void shadeSpan4f(int x, int y, SkPM4f* dst, int count);
void blitSpan(int32_t x, int32_t y, void* dst, int count);
- template <size_t N>
- using Storage = typename std::aligned_storage<N, 16>::type;
-
template<typename Base, size_t kSize, typename Next = void>
class Stage {
public:
@@ -87,8 +84,11 @@
private:
std::function<void (Next*, void*)> fStageCloner;
- mutable Storage<kSize> fSpace;
- bool fIsInitialized;
+ struct SK_STRUCT_ALIGN(16) Space {
+ char space[kSize];
+ };
+ bool fIsInitialized;
+ mutable Space fSpace;
};
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -116,8 +116,11 @@
Base& operator*() const { return *(this->get()); }
private:
- mutable Storage<kSize> fSpace;
- bool fIsInitialized;
+ struct SK_STRUCT_ALIGN(16) Space {
+ char space[kSize];
+ };
+ mutable Space fSpace;
+ bool fIsInitialized;
};
« no previous file with comments | « include/core/SkPostConfig.h ('k') | src/core/SkSmallAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698