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

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

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Fixed expectations 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) 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // be nullptr. 115 // be nullptr.
116 sk_sp<SkColorSpace> skSurfaceColorSpace() const; 116 sk_sp<SkColorSpace> skSurfaceColorSpace() const;
117 SkColorType colorType() const; 117 SkColorType colorType() const;
118 ColorBehavior colorBehaviorForMediaDrawnToCanvas() const; 118 ColorBehavior colorBehaviorForMediaDrawnToCanvas() const;
119 bool skSurfacesUseColorSpace() const; 119 bool skSurfacesUseColorSpace() const;
120 120
121 virtual PassRefPtr<Image> getImage(AccelerationHint, 121 virtual PassRefPtr<Image> getImage(AccelerationHint,
122 SnapshotReason) const = 0; 122 SnapshotReason) const = 0;
123 virtual ImageData* toImageData(SnapshotReason reason) { return nullptr; } 123 virtual ImageData* toImageData(SnapshotReason reason) { return nullptr; }
124 virtual ContextType getContextType() const = 0; 124 virtual ContextType getContextType() const = 0;
125 virtual bool isAccelerated() const { return false; } 125 virtual bool isComposited() const = 0;
126 virtual bool isAccelerated() const = 0;
126 virtual bool shouldAntialias() const { return false; } 127 virtual bool shouldAntialias() const { return false; }
127 virtual void setIsHidden(bool) = 0; 128 virtual void setIsHidden(bool) = 0;
128 virtual bool isContextLost() const { return true; } 129 virtual bool isContextLost() const { return true; }
129 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); }; 130 virtual void setCanvasGetContextResult(RenderingContext&) { NOTREACHED(); };
130 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) { 131 virtual void setOffscreenCanvasGetContextResult(OffscreenRenderingContext&) {
131 NOTREACHED(); 132 NOTREACHED();
132 } 133 }
133 virtual bool isPaintable() const = 0; 134 virtual bool isPaintable() const = 0;
134 virtual void didDraw(const SkIRect& dirtyRect); 135 virtual void didDraw(const SkIRect& dirtyRect);
136 virtual void didDraw();
135 137
136 // Return true if the content is updated. 138 // Return true if the content is updated.
137 virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) { 139 virtual bool paintRenderingResultsToCanvas(SourceDrawingBuffer) {
138 return false; 140 return false;
139 } 141 }
140 142
141 virtual WebLayer* platformLayer() const { return nullptr; } 143 virtual WebLayer* platformLayer() const { return nullptr; }
142 144
143 enum LostContextMode { 145 enum LostContextMode {
144 NotLostContext, 146 NotLostContext,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 CanvasColorSpace m_colorSpace; 235 CanvasColorSpace m_colorSpace;
234 CanvasPixelFormat m_pixelFormat; 236 CanvasPixelFormat m_pixelFormat;
235 bool m_linearPixelMath = false; 237 bool m_linearPixelMath = false;
236 CanvasContextCreationAttributes m_creationAttributes; 238 CanvasContextCreationAttributes m_creationAttributes;
237 bool m_finalizeFrameScheduled = false; 239 bool m_finalizeFrameScheduled = false;
238 }; 240 };
239 241
240 } // namespace blink 242 } // namespace blink
241 243
242 #endif 244 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698