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

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

Issue 192853002: Proposed SkCanvas API for preLoading textures to VRAM (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkCanvas.h ('k') | include/gpu/SkGpuDevice.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 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
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 #ifndef SkDevice_DEFINED 10 #ifndef SkDevice_DEFINED
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 * If the device does not recognize or support this filter, 377 * If the device does not recognize or support this filter,
378 * it just returns false and leaves result and offset unchanged. 378 * it just returns false and leaves result and offset unchanged.
379 */ 379 */
380 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr ix&, 380 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr ix&,
381 SkBitmap* result, SkIPoint* offset) = 0; 381 SkBitmap* result, SkIPoint* offset) = 0;
382 382
383 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if 383 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if
384 // either is identical to kNative_Premul_Config8888. Otherwise, -1. 384 // either is identical to kNative_Premul_Config8888. Otherwise, -1.
385 static const SkCanvas::Config8888 kPMColorAlias; 385 static const SkCanvas::Config8888 kPMColorAlias;
386 386
387 virtual void internalPrivate_PreLoad(const SkBitmap& bitmap, const SkIRect& rect);
388
387 protected: 389 protected:
388 // default impl returns NULL 390 // default impl returns NULL
389 virtual SkSurface* newSurface(const SkImageInfo&); 391 virtual SkSurface* newSurface(const SkImageInfo&);
390 392
391 // default impl returns NULL 393 // default impl returns NULL
392 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); 394 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes);
393 395
394 /** 396 /**
395 * The caller is responsible for "pre-clipping" the src. The impl can assum e that the src 397 * The caller is responsible for "pre-clipping" the src. The impl can assum e that the src
396 * image at the specified x,y offset will fit within the device's bounds. 398 * image at the specified x,y offset will fit within the device's bounds.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 SkMetaData* fMetaData; 455 SkMetaData* fMetaData;
454 456
455 #ifdef SK_DEBUG 457 #ifdef SK_DEBUG
456 bool fAttachedToCanvas; 458 bool fAttachedToCanvas;
457 #endif 459 #endif
458 460
459 typedef SkRefCnt INHERITED; 461 typedef SkRefCnt INHERITED;
460 }; 462 };
461 463
462 #endif 464 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | include/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698