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

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

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Rebase (again) Created 3 years, 10 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 ContextTypeCount, 79 ContextTypeCount,
80 }; 80 };
81 81
82 static ContextType contextTypeFromId(const String& id); 82 static ContextType contextTypeFromId(const String& id);
83 static ContextType resolveContextTypeAliases(ContextType); 83 static ContextType resolveContextTypeAliases(ContextType);
84 84
85 HTMLCanvasElement* canvas() const { return m_canvas; } 85 HTMLCanvasElement* canvas() const { return m_canvas; }
86 86
87 CanvasColorSpace colorSpace() const { return m_colorSpace; }; 87 CanvasColorSpace colorSpace() const { return m_colorSpace; };
88 WTF::String colorSpaceAsString() const; 88 WTF::String colorSpaceAsString() const;
89 sk_sp<SkColorSpace> skColorSpace() const; 89 // The color space in which the the content should be interpreted by the
90 // compositor. This is always defined.
91 gfx::ColorSpace gfxColorSpace() const;
92 // The color space that should be used for SkSurface creation. This may
93 // be nullptr.
94 sk_sp<SkColorSpace> skSurfaceColorSpace() const;
90 SkColorType colorType() const; 95 SkColorType colorType() const;
91 ColorBehavior colorBehaviorForMediaDrawnToCanvas() const; 96 ColorBehavior colorBehaviorForMediaDrawnToCanvas() const;
97 bool skSurfacesUseColorSpace() const;
92 98
93 virtual PassRefPtr<Image> getImage(AccelerationHint, 99 virtual PassRefPtr<Image> getImage(AccelerationHint,
94 SnapshotReason) const = 0; 100 SnapshotReason) const = 0;
95 virtual ImageData* toImageData(SnapshotReason reason) { return nullptr; } 101 virtual ImageData* toImageData(SnapshotReason reason) { return nullptr; }
96 virtual ContextType getContextType() const = 0; 102 virtual ContextType getContextType() const = 0;
97 virtual bool isAccelerated() const { return false; } 103 virtual bool isAccelerated() const { return false; }
98 virtual bool shouldAntialias() const { return false; } 104 virtual bool shouldAntialias() const { return false; }
99 virtual void setIsHidden(bool) = 0; 105 virtual void setIsHidden(bool) = 0;
100 virtual bool isContextLost() const { return true; } 106 virtual bool isContextLost() const { return true; }
101 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); }; 107 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); };
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 Member<OffscreenCanvas> m_offscreenCanvas; 197 Member<OffscreenCanvas> m_offscreenCanvas;
192 HashSet<String> m_cleanURLs; 198 HashSet<String> m_cleanURLs;
193 HashSet<String> m_dirtyURLs; 199 HashSet<String> m_dirtyURLs;
194 CanvasColorSpace m_colorSpace; 200 CanvasColorSpace m_colorSpace;
195 CanvasContextCreationAttributes m_creationAttributes; 201 CanvasContextCreationAttributes m_creationAttributes;
196 }; 202 };
197 203
198 } // namespace blink 204 } // namespace blink
199 205
200 #endif 206 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698