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

Side by Side Diff: src/core/SkPicture.cpp

Issue 197803002: stub for ganesh veto (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « include/core/SkPicture.h ('k') | no next file » | 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 2007 The Android Open Source Project 3 * Copyright 2007 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 #include "SkPictureFlat.h" 10 #include "SkPictureFlat.h"
11 #include "SkPicturePlayback.h" 11 #include "SkPicturePlayback.h"
12 #include "SkPictureRecord.h" 12 #include "SkPictureRecord.h"
13 13
14 #include "SkBitmapDevice.h" 14 #include "SkBitmapDevice.h"
15 #include "SkCanvas.h" 15 #include "SkCanvas.h"
16 #include "SkChunkAlloc.h" 16 #include "SkChunkAlloc.h"
17 #include "SkPicture.h" 17 #include "SkPicture.h"
18 #include "SkRegion.h" 18 #include "SkRegion.h"
19 #include "SkStream.h" 19 #include "SkStream.h"
20 #include "SkTDArray.h" 20 #include "SkTDArray.h"
21 #include "SkTSearch.h" 21 #include "SkTSearch.h"
22 #include "SkTime.h" 22 #include "SkTime.h"
23 23
24 #include "SkReader32.h" 24 #include "SkReader32.h"
25 #include "SkWriter32.h" 25 #include "SkWriter32.h"
26 #include "SkRTree.h" 26 #include "SkRTree.h"
27 #include "SkBBoxHierarchyRecord.h" 27 #include "SkBBoxHierarchyRecord.h"
28 28
29 #if SK_SUPPORT_GPU
30 #include "GrContext.h"
31 #endif
32
29 #define DUMP_BUFFER_SIZE 65536 33 #define DUMP_BUFFER_SIZE 65536
30 34
31 //#define ENABLE_TIME_DRAW // dumps milliseconds for each draw 35 //#define ENABLE_TIME_DRAW // dumps milliseconds for each draw
32 36
33 37
34 #ifdef SK_DEBUG 38 #ifdef SK_DEBUG
35 // enable SK_DEBUG_TRACE to trace DrawType elements when 39 // enable SK_DEBUG_TRACE to trace DrawType elements when
36 // recorded and played back 40 // recorded and played back
37 // #define SK_DEBUG_TRACE 41 // #define SK_DEBUG_TRACE
38 // enable SK_DEBUG_SIZE to see the size of picture components 42 // enable SK_DEBUG_SIZE to see the size of picture components
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 playback->flatten(buffer); 444 playback->flatten(buffer);
441 // delete playback if it is a local version (i.e. cons'd up just now) 445 // delete playback if it is a local version (i.e. cons'd up just now)
442 if (playback != fPlayback) { 446 if (playback != fPlayback) {
443 SkDELETE(playback); 447 SkDELETE(playback);
444 } 448 }
445 } else { 449 } else {
446 buffer.writeBool(false); 450 buffer.writeBool(false);
447 } 451 }
448 } 452 }
449 453
454 bool SkPicture::suitableForGpuRasterization(GrContext* context) const {
bungeman-skia 2014/03/19 22:03:21 This impl also needs to be in #if SK_SUPPORT_GPU
455 // Stub for now; never veto GPu rasterization.
456 return true;
457 }
458
450 bool SkPicture::willPlayBackBitmaps() const { 459 bool SkPicture::willPlayBackBitmaps() const {
451 if (!fPlayback) { 460 if (!fPlayback) {
452 return false; 461 return false;
453 } 462 }
454 return fPlayback->containsBitmaps(); 463 return fPlayback->containsBitmaps();
455 } 464 }
456 465
457 #ifdef SK_BUILD_FOR_ANDROID 466 #ifdef SK_BUILD_FOR_ANDROID
458 void SkPicture::abortPlayback() { 467 void SkPicture::abortPlayback() {
459 if (NULL == fPlayback) { 468 if (NULL == fPlayback) {
460 return; 469 return;
461 } 470 }
462 fPlayback->abort(); 471 fPlayback->abort();
463 } 472 }
464 #endif 473 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698