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

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

Issue 2269073002: Revert of Resolving drawImage issue with canvases that contain bitmap images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // WebGL-specific interface 120 // WebGL-specific interface
121 virtual bool is3d() const { return false; } 121 virtual bool is3d() const { return false; }
122 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); } 122 virtual void setFilterQuality(SkFilterQuality) { NOTREACHED(); }
123 virtual void reshape(int width, int height) { NOTREACHED(); } 123 virtual void reshape(int width, int height) { NOTREACHED(); }
124 virtual void markLayerComposited() { NOTREACHED(); } 124 virtual void markLayerComposited() { NOTREACHED(); }
125 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) { N OTREACHED(); return nullptr; } 125 virtual ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) { N OTREACHED(); return nullptr; }
126 virtual int externallyAllocatedBytesPerPixel() { NOTREACHED(); return 0; } 126 virtual int externallyAllocatedBytesPerPixel() { NOTREACHED(); return 0; }
127 127
128 // ImageBitmap-specific interface 128 // ImageBitmap-specific interface
129 virtual bool paint(GraphicsContext&, const IntRect&) { return false; } 129 virtual bool paint(GraphicsContext&, const IntRect&) { return false; }
130 virtual PassRefPtr<Image> getImage() const { return nullptr; }
131 130
132 bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr); 131 bool wouldTaintOrigin(CanvasImageSource*, SecurityOrigin* = nullptr);
133 void didMoveToNewDocument(Document*); 132 void didMoveToNewDocument(Document*);
134 133
135 // OffscreenCanvas-specific methods 134 // OffscreenCanvas-specific methods
136 OffscreenCanvas* getOffscreenCanvas() const { return m_offscreenCanvas; } 135 OffscreenCanvas* getOffscreenCanvas() const { return m_offscreenCanvas; }
137 virtual ImageBitmap* transferToImageBitmap(ExceptionState&) { return nullptr ; } 136 virtual ImageBitmap* transferToImageBitmap(ExceptionState&) { return nullptr ; }
138 137
139 void detachCanvas() { m_canvas = nullptr; } 138 void detachCanvas() { m_canvas = nullptr; }
140 139
141 protected: 140 protected:
142 CanvasRenderingContext(HTMLCanvasElement* = nullptr, OffscreenCanvas* = null ptr); 141 CanvasRenderingContext(HTMLCanvasElement* = nullptr, OffscreenCanvas* = null ptr);
143 DECLARE_VIRTUAL_TRACE(); 142 DECLARE_VIRTUAL_TRACE();
144 virtual void stop() = 0; 143 virtual void stop() = 0;
145 144
146 private: 145 private:
147 void dispose(); 146 void dispose();
148 147
149 Member<HTMLCanvasElement> m_canvas; 148 Member<HTMLCanvasElement> m_canvas;
150 Member<OffscreenCanvas> m_offscreenCanvas; 149 Member<OffscreenCanvas> m_offscreenCanvas;
151 HashSet<String> m_cleanURLs; 150 HashSet<String> m_cleanURLs;
152 HashSet<String> m_dirtyURLs; 151 HashSet<String> m_dirtyURLs;
153 }; 152 };
154 153
155 } // namespace blink 154 } // namespace blink
156 155
157 #endif 156 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698