Skip to content

Commit

Permalink
Define SK_PICTURE_CLONE_NOOP.
Browse files Browse the repository at this point in the history
This makes SkPicture::clone() a cheap ref, meaning impl-side painting will render
tiles concurrently from the same source SkPicture rather than from clones.

After testing for a few months in Skia, we believe SkPicture is thread safe enough
to try this out on the Chrome bots.  Please revert this at the slightest sign of
crash, flaky drawing, etc.

CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_layout_rel

BUG=

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288096

Review URL: https://codereview.chromium.org/445373003

Cr-Commit-Position: refs/heads/master@{#288233}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288233 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mtklein@chromium.org committed Aug 8, 2014
1 parent 52717b4 commit 427f564
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skia/config/SkUserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#ifndef SkUserConfig_DEFINED
#define SkUserConfig_DEFINED

// Turns SkPicture::clone() into a simple "return SkRef(this);" as a way to
// test the threadsafety of SkPicture playback.
#define SK_PICTURE_CLONE_NOOP 1

/* SkTypes.h, the root of the public header files, does the following trick:
#include <SkPreConfig.h>
Expand Down

0 comments on commit 427f564

Please sign in to comment.