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

Unified Diff: cc/resources/picture.cc

Issue 222903005: cc: Let skia veto gpu rasterization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: replaced && with &= 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 3b90ac4cf0610ebb33d61bdfdbdcdc9a78f404b5..5a8f8d521fcaee6d05c0745f92aa5c698ca51df0 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -195,6 +195,19 @@ Picture* Picture::GetCloneForDrawingOnThread(unsigned thread_index) {
return thread_index == clones_.size() ? this : clones_[thread_index].get();
}
+bool Picture::IsSuitableForGpuRasterization() const {
+ DCHECK(picture_);
+
+ // TODO(alokp): SkPicture::suitableForGpuRasterization needs a GrContext.
+ // Ideally this GrContext should be the same as that for rasterizing this
+ // picture. But we are on the main thread while the rasterization context
+ // may be on the compositor or raster thread.
+ // SkPicture::suitableForGpuRasterization is not implemented yet.
+ // Pass a NULL context for now and discuss with skia folks if the context
+ // is really needed.
+ return picture_->suitableForGpuRasterization(NULL);
+}
+
void Picture::CloneForDrawing(int num_threads) {
TRACE_EVENT1("cc", "Picture::CloneForDrawing", "num_threads", num_threads);

Powered by Google App Engine
This is Rietveld 408576698