OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" | 5 #include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h" |
6 | 6 |
7 #include "bindings/modules/v8/OffscreenCanvasRenderingContext2DOrWebGLRenderingC ontextOrWebGL2RenderingContext.h" | 7 #include "bindings/modules/v8/OffscreenCanvasRenderingContext2DOrWebGLRenderingC ontextOrWebGL2RenderingContext.h" |
8 #include "core/frame/ImageBitmap.h" | 8 #include "core/frame/ImageBitmap.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/workers/WorkerGlobalScope.h" | 10 #include "core/workers/WorkerGlobalScope.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
199 } | 199 } |
200 | 200 |
201 SkImageFilter* OffscreenCanvasRenderingContext2D::stateGetFilter() { | 201 SkImageFilter* OffscreenCanvasRenderingContext2D::stateGetFilter() { |
202 // TODO: make getFilter accept nullptr | 202 // TODO: make getFilter accept nullptr |
203 // return state().getFilter(nullptr, nullptr, IntSize(width(), height()), | 203 // return state().getFilter(nullptr, nullptr, IntSize(width(), height()), |
204 // this); | 204 // this); |
205 return nullptr; | 205 return nullptr; |
206 } | 206 } |
207 | 207 |
208 void OffscreenCanvasRenderingContext2D::validateStateStack() const { | 208 void OffscreenCanvasRenderingContext2D::validateStateStack() const { |
209 #if ENABLE(ASSERT) | 209 #if ENABLE(ASSERT) |
Justin Novosad
2016/10/06 19:48:54
DCHECK_IS_ON()
f(malita)
2016/10/06 20:02:29
Done.
| |
210 SkCanvas* skCanvas = existingDrawingCanvas(); | 210 if (SkCanvas* skCanvas = existingDrawingCanvas()) { |
211 if (skCanvas) { | 211 DCHECK_EQ(static_cast<size_t>(skCanvas->getSaveCount()), |
212 ASSERT(static_cast<size_t>(skCanvas->getSaveCount()) == | 212 m_stateStack.size() + 1); |
213 m_stateStack.size()); | |
214 } | 213 } |
215 #endif | 214 #endif |
216 } | 215 } |
217 | 216 |
218 bool OffscreenCanvasRenderingContext2D::isContextLost() const { | 217 bool OffscreenCanvasRenderingContext2D::isContextLost() const { |
219 return false; | 218 return false; |
220 } | 219 } |
221 | 220 |
222 bool OffscreenCanvasRenderingContext2D::isPaintable() const { | 221 bool OffscreenCanvasRenderingContext2D::isPaintable() const { |
223 return this->imageBuffer(); | 222 return this->imageBuffer(); |
224 } | 223 } |
225 } | 224 } |
OLD | NEW |