Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1023)

Side by Side Diff: include/core/SkDevice.h

Issue 1080923004: SkPDF/Device/ImageFilter: Fix ImageFilter fallback code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkDeviceImageFilterProxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
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 SkDevice_DEFINED 8 #ifndef SkDevice_DEFINED
9 #define SkDevice_DEFINED 9 #define SkDevice_DEFINED
10 10
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 * to perform some device-specific warm up tasks and then let SkCanvas 323 * to perform some device-specific warm up tasks and then let SkCanvas
324 * perform the main rendering loop (by return false from here). 324 * perform the main rendering loop (by return false from here).
325 */ 325 */
326 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM atrix*, 326 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM atrix*,
327 const SkPaint*); 327 const SkPaint*);
328 328
329 struct CreateInfo { 329 struct CreateInfo {
330 static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkP ixelGeometry); 330 static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkP ixelGeometry);
331 331
332 // The constructor may change the pixel geometry based on other paramete rs. 332 // The constructor may change the pixel geometry based on other paramete rs.
333 CreateInfo(const SkImageInfo& info, TileUsage tileUsage, SkPixelGeometry geo) 333 CreateInfo(const SkImageInfo& info,
334 TileUsage tileUsage,
335 SkPixelGeometry geo,
336 bool forImageFilter = false)
334 : fInfo(info) 337 : fInfo(info)
335 , fTileUsage(tileUsage) 338 , fTileUsage(tileUsage)
336 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo)) 339 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo))
337 {} 340 , fForImageFilter(forImageFilter) {}
338 341
339 const SkImageInfo fInfo; 342 const SkImageInfo fInfo;
340 const TileUsage fTileUsage; 343 const TileUsage fTileUsage;
341 const SkPixelGeometry fPixelGeometry; 344 const SkPixelGeometry fPixelGeometry;
345 const bool fForImageFilter;
342 }; 346 };
343 347
344 /** 348 /**
345 * Create a new device based on CreateInfo. If the paint is not null, then it represents a 349 * Create a new device based on CreateInfo. If the paint is not null, then it represents a
346 * preview of how the new device will be composed with its creator device ( this). 350 * preview of how the new device will be composed with its creator device ( this).
347 */ 351 */
348 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { 352 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) {
349 return NULL; 353 return NULL;
350 } 354 }
351 355
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 SkDeviceProperties* fLeakyProperties; // will always exist. 389 SkDeviceProperties* fLeakyProperties; // will always exist.
386 390
387 #ifdef SK_DEBUG 391 #ifdef SK_DEBUG
388 bool fAttachedToCanvas; 392 bool fAttachedToCanvas;
389 #endif 393 #endif
390 394
391 typedef SkRefCnt INHERITED; 395 typedef SkRefCnt INHERITED;
392 }; 396 };
393 397
394 #endif 398 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkDeviceImageFilterProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698