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

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

Issue 2825183002: Plumb CanvasColorParams to canvas image classes (Closed)
Patch Set: Require both runtime flags Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 class PLATFORM_EXPORT ImageBuffer { 72 class PLATFORM_EXPORT ImageBuffer {
73 WTF_MAKE_NONCOPYABLE(ImageBuffer); 73 WTF_MAKE_NONCOPYABLE(ImageBuffer);
74 USING_FAST_MALLOC(ImageBuffer); 74 USING_FAST_MALLOC(ImageBuffer);
75 75
76 public: 76 public:
77 static std::unique_ptr<ImageBuffer> Create( 77 static std::unique_ptr<ImageBuffer> Create(
78 const IntSize&, 78 const IntSize&,
79 OpacityMode = kNonOpaque, 79 OpacityMode = kNonOpaque,
80 ImageInitializationMode = kInitializeImagePixels, 80 ImageInitializationMode = kInitializeImagePixels,
81 sk_sp<SkColorSpace> = nullptr); 81 const CanvasColorParams& = CanvasColorParams());
82 static std::unique_ptr<ImageBuffer> Create( 82 static std::unique_ptr<ImageBuffer> Create(
83 std::unique_ptr<ImageBufferSurface>); 83 std::unique_ptr<ImageBufferSurface>);
84 84
85 virtual ~ImageBuffer(); 85 virtual ~ImageBuffer();
86 86
87 void SetClient(ImageBufferClient* client) { client_ = client; } 87 void SetClient(ImageBufferClient* client) { client_ = client; }
88 88
89 static bool CanCreateImageBuffer(const IntSize&); 89 static bool CanCreateImageBuffer(const IntSize&);
90 const IntSize& size() const { return surface_->size(); } 90 const IntSize& size() const { return surface_->size(); }
91 bool IsAccelerated() const { return surface_->IsAccelerated(); } 91 bool IsAccelerated() const { return surface_->IsAccelerated(); }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 int Height() const { return size_.Height(); } 213 int Height() const { return size_.Height(); }
214 int Width() const { return size_.Width(); } 214 int Width() const { return size_.Width(); }
215 215
216 const unsigned char* data_; 216 const unsigned char* data_;
217 const IntSize size_; 217 const IntSize size_;
218 }; 218 };
219 219
220 } // namespace blink 220 } // namespace blink
221 221
222 #endif // ImageBuffer_h 222 #endif // ImageBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698