| Index: runtime/embedders/openglui/common/canvas_context.h
|
| ===================================================================
|
| --- runtime/embedders/openglui/common/canvas_context.h (revision 20570)
|
| +++ runtime/embedders/openglui/common/canvas_context.h (working copy)
|
| @@ -103,19 +103,9 @@
|
| state_->setGlobalCompositeOperation(op);
|
| }
|
|
|
| - inline void Save() {
|
| - state_ = state_->Save();
|
| - }
|
| + void Save();
|
| + void Restore();
|
|
|
| - inline void Restore() {
|
| - CanvasState* popped_state = state_;
|
| - state_ = state_->Restore();
|
| - if (state_ != popped_state) {
|
| - // Only delete if the pop was successful.
|
| - delete popped_state;
|
| - }
|
| - }
|
| -
|
| inline void Rotate(float angle) {
|
| canvas_->rotate(Radians2Degrees(angle));
|
| }
|
| @@ -306,6 +296,25 @@
|
| virtual void Flush() {
|
| canvas_->flush();
|
| }
|
| +
|
| + inline void SetFillGradient(bool is_radial, double x0, double y0, double r0,
|
| + double x1, double y1, double r1,
|
| + int stops, float* positions, char** colors) {
|
| + state_->SetFillGradient(is_radial, x0, y0, r0, x1, y1, r1,
|
| + stops, positions, colors);
|
| + }
|
| +
|
| + inline void SetStrokeGradient(bool is_radial, double x0, double y0, double r0,
|
| + double x1, double y1, double r1,
|
| + int stops, float* positions, char** colors) {
|
| + state_->SetStrokeGradient(is_radial, x0, y0, r0, x1, y1, r1,
|
| + stops, positions, colors);
|
| + }
|
| +
|
| + inline const SkBitmap* GetBitmap() {
|
| + SkDevice* device = canvas_->getDevice();
|
| + return &device->accessBitmap(false);
|
| + }
|
| };
|
|
|
| CanvasContext* Context2D(int handle);
|
|
|