summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav/WebView.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-03-09 15:48:14 -0800
committerNicolas Roard <nicolasroard@google.com>2012-03-09 17:25:29 -0800
commitb3f4d3af0b06dc168453641e249d0cb9eec9b570 (patch)
tree860279e3446097a24a3b606ff491300134685afe /Source/WebKit/android/nav/WebView.cpp
parent296d05c7bd54360261dedc8d387a7bf9f52ca41b (diff)
downloadexternal_webkit-b3f4d3af0b06dc168453641e249d0cb9eec9b570.zip
external_webkit-b3f4d3af0b06dc168453641e249d0cb9eec9b570.tar.gz
external_webkit-b3f4d3af0b06dc168453641e249d0cb9eec9b570.tar.bz2
Introduce a LayerContent interface
Layers can now use a LayerContent object to draw their content. We currently have two subclasses, one using an SkPicture (currently used for composited layers), the other using a PictureSet (that we use for the base layer). First step toward unification... Change-Id: I5e7fd06a653f02f8721613fd3a39d36fb64a8614
Diffstat (limited to 'Source/WebKit/android/nav/WebView.cpp')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 5f5ff62..03dd866 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -294,14 +294,14 @@ PictureSet* draw(SkCanvas* canvas, SkColor bgColor, DrawExtras extras, bool spli
}
// draw the content of the base layer first
- PictureSet* content = m_baseLayer->content();
+ LayerContent* content = m_baseLayer->content();
+
int sc = canvas->save(SkCanvas::kClip_SaveFlag);
canvas->clipRect(SkRect::MakeLTRB(0, 0, content->width(),
content->height()), SkRegion::kDifference_Op);
canvas->drawColor(bgColor);
canvas->restoreToCount(sc);
- if (content->draw(canvas))
- ret = split ? new PictureSet(*content) : 0;
+ content->draw(canvas);
DrawExtra* extra = getDrawExtra(extras);
if (extra)
@@ -559,7 +559,7 @@ void replaceBaseContent(PictureSet* set)
{
if (!m_baseLayer)
return;
- m_baseLayer->setContent(*set);
+ // TODO: remove the split picture codepath
delete set;
}
@@ -567,7 +567,7 @@ void copyBaseContentToPicture(SkPicture* picture)
{
if (!m_baseLayer)
return;
- PictureSet* content = m_baseLayer->content();
+ LayerContent* content = m_baseLayer->content();
m_baseLayer->drawCanvas(picture->beginRecording(content->width(), content->height(),
SkPicture::kUsePathBoundsForClip_RecordingFlag));
picture->endRecording();