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

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

Issue 1513513002: try adding flag to allow lcd text even in a layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: hobgoblins Created 5 years 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 | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 * 'optimize' call) this entry point should make use of it and return true 326 * 'optimize' call) this entry point should make use of it and return true
327 * if all rendering has been done. If false is returned, SkCanvas will 327 * if all rendering has been done. If false is returned, SkCanvas will
328 * perform its own rendering pass. It is acceptable for the backend 328 * perform its own rendering pass. It is acceptable for the backend
329 * to perform some device-specific warm up tasks and then let SkCanvas 329 * to perform some device-specific warm up tasks and then let SkCanvas
330 * perform the main rendering loop (by return false from here). 330 * perform the main rendering loop (by return false from here).
331 */ 331 */
332 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM atrix*, 332 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM atrix*,
333 const SkPaint*); 333 const SkPaint*);
334 334
335 struct CreateInfo { 335 struct CreateInfo {
336 static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkP ixelGeometry); 336 static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkP ixelGeometry,
337 bool preserveLCDText);
337 338
338 // The constructor may change the pixel geometry based on other paramete rs. 339 // The constructor may change the pixel geometry based on other paramete rs.
339 CreateInfo(const SkImageInfo& info, 340 CreateInfo(const SkImageInfo& info,
340 TileUsage tileUsage, 341 TileUsage tileUsage,
341 SkPixelGeometry geo, 342 SkPixelGeometry geo)
342 bool forImageFilter = false)
343 : fInfo(info) 343 : fInfo(info)
344 , fTileUsage(tileUsage) 344 , fTileUsage(tileUsage)
345 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo)) 345 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo, false))
346 , fForImageFilter(false) {}
347
348 CreateInfo(const SkImageInfo& info,
349 TileUsage tileUsage,
350 SkPixelGeometry geo,
351 bool preserveLCDText,
352 bool forImageFilter)
353 : fInfo(info)
354 , fTileUsage(tileUsage)
355 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo, preserveLCDTex t))
346 , fForImageFilter(forImageFilter) {} 356 , fForImageFilter(forImageFilter) {}
347 357
348 const SkImageInfo fInfo; 358 const SkImageInfo fInfo;
349 const TileUsage fTileUsage; 359 const TileUsage fTileUsage;
350 const SkPixelGeometry fPixelGeometry; 360 const SkPixelGeometry fPixelGeometry;
351 const bool fForImageFilter; 361 const bool fForImageFilter;
352 }; 362 };
353 363
354 /** 364 /**
355 * Create a new device based on CreateInfo. If the paint is not null, then it represents a 365 * Create a new device based on CreateInfo. If the paint is not null, then it represents a
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 SkSurfaceProps fSurfaceProps; 413 SkSurfaceProps fSurfaceProps;
404 414
405 #ifdef SK_DEBUG 415 #ifdef SK_DEBUG
406 bool fAttachedToCanvas; 416 bool fAttachedToCanvas;
407 #endif 417 #endif
408 418
409 typedef SkRefCnt INHERITED; 419 typedef SkRefCnt INHERITED;
410 }; 420 };
411 421
412 #endif 422 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698