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

Side by Side Diff: src/core/SkPicturePlayback.h

Issue 350183006: Move allocation of texture from SkGpuDevice to GrLayerCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments Created 6 years, 6 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/gpu/GrContext.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 /* 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 #ifndef SkPicturePlayback_DEFINED 9 #ifndef SkPicturePlayback_DEFINED
10 #define SkPicturePlayback_DEFINED 10 #define SkPicturePlayback_DEFINED
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // a single drawBitmap call (using a precomputed bitmap). 338 // a single drawBitmap call (using a precomputed bitmap).
339 class PlaybackReplacements { 339 class PlaybackReplacements {
340 public: 340 public:
341 // All the operations between fStart and fStop (inclusive) will be repla ced with 341 // All the operations between fStart and fStop (inclusive) will be repla ced with
342 // a single drawBitmap call using fPos, fBM and fPaint. 342 // a single drawBitmap call using fPos, fBM and fPaint.
343 // fPaint will be NULL if the picture's paint wasn't copyable 343 // fPaint will be NULL if the picture's paint wasn't copyable
344 struct ReplacementInfo { 344 struct ReplacementInfo {
345 size_t fStart; 345 size_t fStart;
346 size_t fStop; 346 size_t fStop;
347 SkIPoint fPos; 347 SkIPoint fPos;
348 SkBitmap* fBM; 348 SkBitmap* fBM; // fBM is allocated so ReplacementInfo can remain POD
349 const SkPaint* fPaint; // Note: this object doesn't own the paint 349 const SkPaint* fPaint; // Note: this object doesn't own the paint
350 }; 350 };
351 351
352 ~PlaybackReplacements() { this->freeAll(); } 352 ~PlaybackReplacements() { this->freeAll(); }
353 353
354 // Add a new replacement range. The replacement ranges should be 354 // Add a new replacement range. The replacement ranges should be
355 // sorted in increasing order and non-overlapping (esp. no nested 355 // sorted in increasing order and non-overlapping (esp. no nested
356 // saveLayers). 356 // saveLayers).
357 ReplacementInfo* push(); 357 ReplacementInfo* push();
358 358
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 void initForPlayback() const; 421 void initForPlayback() const;
422 422
423 #ifdef SK_BUILD_FOR_ANDROID 423 #ifdef SK_BUILD_FOR_ANDROID
424 SkMutex fDrawMutex; 424 SkMutex fDrawMutex;
425 bool fAbortCurrentPlayback; 425 bool fAbortCurrentPlayback;
426 #endif 426 #endif
427 }; 427 };
428 428
429 #endif 429 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698