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

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: rebase again 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 HitTestCanvasResult; 62 class HitTestCanvasResult;
61 class HTMLCanvasElement; 63 class HTMLCanvasElement;
62 class Image; 64 class Image;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 static CanvasRenderingContextFactory* getRenderingContextFactory(int); 223 static CanvasRenderingContextFactory* getRenderingContextFactory(int);
222 224
223 bool shouldAccelerate(const IntSize&, const WebGraphicsContext3DProvider* sh aredMainThreadContextProvider) const; 225 bool shouldAccelerate(const IntSize&, const WebGraphicsContext3DProvider* sh aredMainThreadContextProvider) const;
224 226
225 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; 227 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override;
226 LayoutObject* createLayoutObject(const ComputedStyle&) override; 228 LayoutObject* createLayoutObject(const ComputedStyle&) override;
227 bool areAuthorShadowsAllowed() const override { return false; } 229 bool areAuthorShadowsAllowed() const override { return false; }
228 230
229 void reset(); 231 void reset();
230 232
231 std::unique_ptr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount); 233 std::unique_ptr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount, sk_sp<SkColorSpace>);
232 void createImageBuffer(); 234 void createImageBuffer();
233 void createImageBufferInternal(std::unique_ptr<ImageBufferSurface> externalS urface); 235 void createImageBufferInternal(std::unique_ptr<ImageBufferSurface> externalS urface);
234 bool shouldUseDisplayList(const IntSize& deviceSize); 236 bool shouldUseDisplayList(const IntSize& deviceSize);
235 237
236 void setSurfaceSize(const IntSize&); 238 void setSurfaceSize(const IntSize&);
237 239
238 bool paintsIntoCanvasBuffer() const; 240 bool paintsIntoCanvasBuffer() const;
239 241
240 ImageData* toImageData(SourceDrawingBuffer, SnapshotReason) const; 242 ImageData* toImageData(SourceDrawingBuffer, SnapshotReason) const;
241 243
(...skipping 23 matching lines...) Expand all
265 // Used for OffscreenCanvas that controls this HTML canvas element 267 // Used for OffscreenCanvas that controls this HTML canvas element
266 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; 268 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
267 269
268 int m_numFramesSinceLastRenderingModeSwitch; 270 int m_numFramesSinceLastRenderingModeSwitch;
269 bool m_pendingRenderingModeSwitch; 271 bool m_pendingRenderingModeSwitch;
270 }; 272 };
271 273
272 } // namespace blink 274 } // namespace blink
273 275
274 #endif // HTMLCanvasElement_h 276 #endif // HTMLCanvasElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698