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

Unified Diff: cc/picture_image_layer.cc

Issue 12328153: Merge 184464 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « cc/picture_image_layer.h ('k') | cc/picture_image_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_image_layer.cc
===================================================================
--- cc/picture_image_layer.cc (revision 185037)
+++ cc/picture_image_layer.cc (working copy)
@@ -4,6 +4,7 @@
#include "cc/picture_image_layer.h"
+#include "cc/picture_image_layer_impl.h"
#include "third_party/skia/include/core/SkCanvas.h"
namespace cc {
@@ -23,6 +24,15 @@
clearClient();
}
+scoped_ptr<LayerImpl> PictureImageLayer::createLayerImpl(
+ LayerTreeImpl* treeImpl) {
+ return PictureImageLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>();
+}
+
+bool PictureImageLayer::drawsContent() const {
+ return !bitmap_.isNull() && PictureLayer::drawsContent();
+}
+
void PictureImageLayer::setBitmap(const SkBitmap& bitmap)
{
// setBitmap() currently gets called whenever there is any
@@ -36,21 +46,6 @@
setNeedsDisplay();
}
-void PictureImageLayer::update(
- ResourceUpdateQueue& queue,
- const OcclusionTracker* tracker,
- RenderingStats* stats) {
- if (bounds() != bounds_) {
- // Pictures are recorded in layer space, so if the layer size changes,
- // then the picture needs to be re-scaled, as a directly composited image
- // always fills its entire layer bounds. This could be improved by
- // recording pictures of images at their actual resolution somehow.
- bounds_ = bounds();
- setNeedsDisplay();
- }
- PictureLayer::update(queue, tracker, stats);
-}
-
void PictureImageLayer::paintContents(
SkCanvas* canvas,
const gfx::Rect& clip,
« no previous file with comments | « cc/picture_image_layer.h ('k') | cc/picture_image_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698