OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkGatherPixelRefsAndRects_DEFINED | 8 #ifndef SkGatherPixelRefsAndRects_DEFINED |
9 #define SkGatherPixelRefsAndRects_DEFINED | 9 #define SkGatherPixelRefsAndRects_DEFINED |
10 | 10 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 return SkShader::kNone_BitmapType != shader->asABitmap(bitmap, N
ULL, NULL); | 295 return SkShader::kNone_BitmapType != shader->asABitmap(bitmap, N
ULL, NULL); |
296 } | 296 } |
297 } | 297 } |
298 return false; | 298 return false; |
299 } | 299 } |
300 | 300 |
301 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE { | 301 virtual void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRI
DE { |
302 NotSupported(); | 302 NotSupported(); |
303 } | 303 } |
304 | 304 |
305 virtual SkBaseDevice* onCreateDevice(const SkImageInfo& info, Usage usage) S
K_OVERRIDE { | 305 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) SK_OV
ERRIDE { |
306 // we expect to only get called via savelayer, in which case it is fine. | 306 // we expect to only get called via savelayer, in which case it is fine. |
307 SkASSERT(kSaveLayer_Usage == usage); | 307 SkASSERT(kSaveLayer_Usage == info.fUsage); |
308 return SkNEW_ARGS(SkGatherPixelRefsAndRectsDevice, | 308 return SkNEW_ARGS(SkGatherPixelRefsAndRectsDevice, |
309 (info.width(), info.height(), fPRCont)); | 309 (info.fInfo.width(), info.fInfo.height(), fPRCont)); |
310 } | 310 } |
311 | 311 |
312 static void NotSupported() { | 312 static void NotSupported() { |
313 SkDEBUGFAIL("this method should never be called"); | 313 SkDEBUGFAIL("this method should never be called"); |
314 } | 314 } |
315 | 315 |
316 static void NothingToDo() {} | 316 static void NothingToDo() {} |
317 | 317 |
318 typedef SkBaseDevice INHERITED; | 318 typedef SkBaseDevice INHERITED; |
319 }; | 319 }; |
320 | 320 |
321 #endif // SkGatherPixelRefsAndRects_DEFINED | 321 #endif // SkGatherPixelRefsAndRects_DEFINED |
OLD | NEW |