Chromium Code Reviews| 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/UnionTypesModules.h" | 7 #include "bindings/modules/v8/UnionTypesModules.h" |
| 8 #include "core/frame/ImageBitmap.h" | 8 #include "core/frame/ImageBitmap.h" |
| 9 #include "platform/graphics/ImageBuffer.h" | 9 #include "platform/graphics/ImageBuffer.h" |
| 10 #include "platform/graphics/StaticBitmapImage.h" | 10 #include "platform/graphics/StaticBitmapImage.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 return false; | 125 return false; |
| 126 } | 126 } |
| 127 | 127 |
| 128 SkImageFilter* OffscreenCanvasRenderingContext2D::stateGetFilter() | 128 SkImageFilter* OffscreenCanvasRenderingContext2D::stateGetFilter() |
| 129 { | 129 { |
| 130 // TODO: make getFilter accept nullptr | 130 // TODO: make getFilter accept nullptr |
| 131 // return state().getFilter(nullptr, nullptr, IntSize(width(), height()), th is); | 131 // return state().getFilter(nullptr, nullptr, IntSize(width(), height()), th is); |
| 132 return nullptr; | 132 return nullptr; |
| 133 } | 133 } |
| 134 | 134 |
| 135 void OffscreenCanvasRenderingContext2D::snapshotStateForFilter() | |
|
Justin Novosad
2016/04/18 18:03:22
Nit: could put empty impl in header, like you did
ajuma
2016/04/18 21:32:44
Done.
| |
| 136 { | |
| 137 } | |
| 138 | |
| 135 void OffscreenCanvasRenderingContext2D::validateStateStack() | 139 void OffscreenCanvasRenderingContext2D::validateStateStack() |
| 136 { | 140 { |
| 137 #if ENABLE(ASSERT) | 141 #if ENABLE(ASSERT) |
| 138 SkCanvas* skCanvas = existingDrawingCanvas(); | 142 SkCanvas* skCanvas = existingDrawingCanvas(); |
| 139 if (skCanvas) { | 143 if (skCanvas) { |
| 140 ASSERT(static_cast<size_t>(skCanvas->getSaveCount()) == m_stateStack.siz e()); | 144 ASSERT(static_cast<size_t>(skCanvas->getSaveCount()) == m_stateStack.siz e()); |
| 141 } | 145 } |
| 142 #endif | 146 #endif |
| 143 } | 147 } |
| 144 | 148 |
| 145 bool OffscreenCanvasRenderingContext2D::isContextLost() const | 149 bool OffscreenCanvasRenderingContext2D::isContextLost() const |
| 146 { | 150 { |
| 147 return false; | 151 return false; |
| 148 } | 152 } |
| 149 | 153 |
| 150 } | 154 } |
| OLD | NEW |