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

Unified Diff: cc/skpicture_content_layer_updater.cc

Issue 12471007: Part 8 of cc/ directory shuffles: resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « cc/skpicture_content_layer_updater.h ('k') | cc/test/fake_content_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/skpicture_content_layer_updater.cc
diff --git a/cc/skpicture_content_layer_updater.cc b/cc/skpicture_content_layer_updater.cc
deleted file mode 100644
index d4213fba3debf5e390f290530312aabd9ad0a9ec..0000000000000000000000000000000000000000
--- a/cc/skpicture_content_layer_updater.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/skpicture_content_layer_updater.h"
-
-#include "base/debug/trace_event.h"
-#include "cc/layer_painter.h"
-#include "cc/prioritized_resource.h"
-#include "cc/resource_update_queue.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-
-namespace cc {
-
-SkPictureContentLayerUpdater::Resource::Resource(
- SkPictureContentLayerUpdater* updater,
- scoped_ptr<PrioritizedResource> texture)
- : LayerUpdater::Resource(texture.Pass()), updater_(updater) {}
-
-SkPictureContentLayerUpdater::Resource::~Resource() {}
-
-void SkPictureContentLayerUpdater::Resource::Update(ResourceUpdateQueue* queue,
- gfx::Rect source_rect,
- gfx::Vector2d dest_offset,
- bool partial_update,
- RenderingStats*) {
- updater_->UpdateTexture(
- queue, texture(), source_rect, dest_offset, partial_update);
-}
-
-SkPictureContentLayerUpdater::SkPictureContentLayerUpdater(
- scoped_ptr<LayerPainter> painter)
- : ContentLayerUpdater(painter.Pass()), layer_is_opaque_(false) {}
-
-SkPictureContentLayerUpdater::~SkPictureContentLayerUpdater() {}
-
-scoped_refptr<SkPictureContentLayerUpdater>
-SkPictureContentLayerUpdater::Create(scoped_ptr<LayerPainter> painter) {
- return make_scoped_refptr(new SkPictureContentLayerUpdater(painter.Pass()));
-}
-
-scoped_ptr<LayerUpdater::Resource> SkPictureContentLayerUpdater::CreateResource(
- PrioritizedResourceManager* manager) {
- return scoped_ptr<LayerUpdater::Resource>(
- new Resource(this, PrioritizedResource::create(manager)));
-}
-
-void SkPictureContentLayerUpdater::PrepareToUpdate(
- gfx::Rect content_rect,
- gfx::Size,
- float contentsWidthScale,
- float contents_height_scale,
- gfx::Rect* resultingOpaqueRect,
- RenderingStats* stats) {
- SkCanvas* canvas =
- picture_.beginRecording(content_rect.width(), content_rect.height());
- PaintContents(canvas,
- content_rect,
- contentsWidthScale,
- contents_height_scale,
- resultingOpaqueRect,
- stats);
- picture_.endRecording();
-}
-
-void SkPictureContentLayerUpdater::DrawPicture(SkCanvas* canvas) {
- TRACE_EVENT0("cc", "SkPictureContentLayerUpdater::drawPicture");
- canvas->drawPicture(picture_);
-}
-
-void SkPictureContentLayerUpdater::UpdateTexture(ResourceUpdateQueue* queue,
- PrioritizedResource* texture,
- gfx::Rect source_rect,
- gfx::Vector2d dest_offset,
- bool partial_update) {
- ResourceUpdate upload = ResourceUpdate::CreateFromPicture(
- texture, &picture_, content_rect(), source_rect, dest_offset);
- if (partial_update)
- queue->appendPartialUpload(upload);
- else
- queue->appendFullUpload(upload);
-}
-
-void SkPictureContentLayerUpdater::SetOpaque(bool opaque) {
- layer_is_opaque_ = opaque;
-}
-
-} // namespace cc
« no previous file with comments | « cc/skpicture_content_layer_updater.h ('k') | cc/test/fake_content_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698