OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkBitmapHeap.h" | 10 #include "SkBitmapHeap.h" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 static void translate_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, | 310 static void translate_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, |
311 SkGPipeState* state) { | 311 SkGPipeState* state) { |
312 const SkScalar* param = skip<SkScalar>(reader, 2); | 312 const SkScalar* param = skip<SkScalar>(reader, 2); |
313 canvas->translate(param[0], param[1]); | 313 canvas->translate(param[0], param[1]); |
314 } | 314 } |
315 | 315 |
316 /////////////////////////////////////////////////////////////////////////////// | 316 /////////////////////////////////////////////////////////////////////////////// |
317 | 317 |
318 static void save_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, | 318 static void save_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, |
319 SkGPipeState* state) { | 319 SkGPipeState* state) { |
320 canvas->save((SkCanvas::SaveFlags)DrawOp_unpackData(op32)); | 320 canvas->save(); |
321 } | 321 } |
322 | 322 |
323 static void saveLayer_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, | 323 static void saveLayer_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, |
324 SkGPipeState* state) { | 324 SkGPipeState* state) { |
325 unsigned flags = DrawOp_unpackFlags(op32); | 325 unsigned flags = DrawOp_unpackFlags(op32); |
326 SkCanvas::SaveFlags saveFlags = (SkCanvas::SaveFlags)DrawOp_unpackData(op32)
; | 326 SkCanvas::SaveFlags saveFlags = (SkCanvas::SaveFlags)DrawOp_unpackData(op32)
; |
327 | 327 |
328 const SkRect* bounds = NULL; | 328 const SkRect* bounds = NULL; |
329 if (flags & kSaveLayer_HasBounds_DrawOpFlag) { | 329 if (flags & kSaveLayer_HasBounds_DrawOpFlag) { |
330 bounds = skip<SkRect>(reader); | 330 bounds = skip<SkRect>(reader); |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 status = kReadAtom_Status; | 897 status = kReadAtom_Status; |
898 break; | 898 break; |
899 } | 899 } |
900 } | 900 } |
901 | 901 |
902 if (bytesRead) { | 902 if (bytesRead) { |
903 *bytesRead = reader.offset(); | 903 *bytesRead = reader.offset(); |
904 } | 904 } |
905 return status; | 905 return status; |
906 } | 906 } |
OLD | NEW |