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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.h

Issue 2212163002: Add some plumbing for the color management of canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build and tests Created 4 years, 4 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) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "platform/geometry/IntSize.h" 43 #include "platform/geometry/IntSize.h"
44 #include "platform/graphics/CanvasSurfaceLayerBridge.h" 44 #include "platform/graphics/CanvasSurfaceLayerBridge.h"
45 #include "platform/graphics/GraphicsTypes.h" 45 #include "platform/graphics/GraphicsTypes.h"
46 #include "platform/graphics/GraphicsTypes3D.h" 46 #include "platform/graphics/GraphicsTypes3D.h"
47 #include "platform/graphics/ImageBufferClient.h" 47 #include "platform/graphics/ImageBufferClient.h"
48 #include "platform/heap/Handle.h" 48 #include "platform/heap/Handle.h"
49 #include <memory> 49 #include <memory>
50 50
51 #define CanvasDefaultInterpolationQuality InterpolationLow 51 #define CanvasDefaultInterpolationQuality InterpolationLow
52 52
53 class SkColorSpace;
54
53 namespace blink { 55 namespace blink {
54 56
55 class AffineTransform; 57 class AffineTransform;
56 class CanvasContextCreationAttributes; 58 class CanvasContextCreationAttributes;
57 class CanvasRenderingContext; 59 class CanvasRenderingContext;
58 class CanvasRenderingContextFactory; 60 class CanvasRenderingContextFactory;
59 class GraphicsContext; 61 class GraphicsContext;
60 class HTMLCanvasElement; 62 class HTMLCanvasElement;
61 class Image; 63 class Image;
62 class ImageBitmapOptions; 64 class ImageBitmapOptions;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 using ContextFactoryVector = Vector<std::unique_ptr<CanvasRenderingContextFa ctory>>; 221 using ContextFactoryVector = Vector<std::unique_ptr<CanvasRenderingContextFa ctory>>;
220 static ContextFactoryVector& renderingContextFactories(); 222 static ContextFactoryVector& renderingContextFactories();
221 static CanvasRenderingContextFactory* getRenderingContextFactory(int); 223 static CanvasRenderingContextFactory* getRenderingContextFactory(int);
222 224
223 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; 225 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override;
224 LayoutObject* createLayoutObject(const ComputedStyle&) override; 226 LayoutObject* createLayoutObject(const ComputedStyle&) override;
225 bool areAuthorShadowsAllowed() const override { return false; } 227 bool areAuthorShadowsAllowed() const override { return false; }
226 228
227 void reset(); 229 void reset();
228 230
229 std::unique_ptr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount); 231 std::unique_ptr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount, sk_sp<SkColorSpace>);
230 void createImageBuffer(); 232 void createImageBuffer();
231 void createImageBufferInternal(std::unique_ptr<ImageBufferSurface> externalS urface); 233 void createImageBufferInternal(std::unique_ptr<ImageBufferSurface> externalS urface);
232 bool shouldUseDisplayList(const IntSize& deviceSize); 234 bool shouldUseDisplayList(const IntSize& deviceSize);
233 235
234 void setSurfaceSize(const IntSize&); 236 void setSurfaceSize(const IntSize&);
235 237
236 bool paintsIntoCanvasBuffer() const; 238 bool paintsIntoCanvasBuffer() const;
237 239
238 ImageData* toImageData(SourceDrawingBuffer, SnapshotReason) const; 240 ImageData* toImageData(SourceDrawingBuffer, SnapshotReason) const;
239 241
(...skipping 23 matching lines...) Expand all
263 // Used for OffscreenCanvas that controls this HTML canvas element 265 // Used for OffscreenCanvas that controls this HTML canvas element
264 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; 266 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
265 267
266 int m_numFramesSinceLastRenderingModeSwitch; 268 int m_numFramesSinceLastRenderingModeSwitch;
267 bool m_pendingRenderingModeSwitch; 269 bool m_pendingRenderingModeSwitch;
268 }; 270 };
269 271
270 } // namespace blink 272 } // namespace blink
271 273
272 #endif // HTMLCanvasElement_h 274 #endif // HTMLCanvasElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698