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

Unified Diff: cc/resources/raster_worker_pool.cc

Issue 111143005: cc: Gather and lock/unlock SkDiscardablePixelRefs instead of skia::LazyPixelRefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/lazy/discardable/ to fix cc_unittests Created 6 years, 11 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/resources/raster_worker_pool.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/raster_worker_pool.cc
diff --git a/cc/resources/raster_worker_pool.cc b/cc/resources/raster_worker_pool.cc
index 06fd18e62e0ec2bdc9d440ee0ae6eb925c867ef4..06a78a8260de9644802594f8fa8e6b59b5a15636 100644
--- a/cc/resources/raster_worker_pool.cc
+++ b/cc/resources/raster_worker_pool.cc
@@ -10,9 +10,9 @@
#include "cc/debug/devtools_instrumentation.h"
#include "cc/debug/traced_value.h"
#include "cc/resources/picture_pile_impl.h"
-#include "skia/ext/lazy_pixel_ref.h"
#include "skia/ext/paint_simplifier.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkPixelRef.h"
namespace cc {
@@ -253,7 +253,7 @@ class RasterWorkerPoolTaskImpl : public internal::RasterWorkerPoolTask {
class ImageDecodeWorkerPoolTaskImpl : public internal::WorkerPoolTask {
public:
- ImageDecodeWorkerPoolTaskImpl(skia::LazyPixelRef* pixel_ref,
+ ImageDecodeWorkerPoolTaskImpl(SkPixelRef* pixel_ref,
int layer_id,
RenderingStatsInstrumentation* rendering_stats,
const RasterWorkerPool::Task::Reply& reply)
@@ -267,7 +267,9 @@ class ImageDecodeWorkerPoolTaskImpl : public internal::WorkerPoolTask {
TRACE_EVENT0("cc", "ImageDecodeWorkerPoolTaskImpl::RunOnWorkerThread");
devtools_instrumentation::ScopedImageDecodeTask image_decode_task(
pixel_ref_.get());
- pixel_ref_->Decode();
+ // This will cause the image referred to by pixel ref to be decoded.
+ pixel_ref_->lockPixels();
+ pixel_ref_->unlockPixels();
}
virtual void CompleteOnOriginThread() OVERRIDE {
reply_.Run(!HasFinishedRunning());
@@ -277,7 +279,7 @@ class ImageDecodeWorkerPoolTaskImpl : public internal::WorkerPoolTask {
virtual ~ImageDecodeWorkerPoolTaskImpl() {}
private:
- skia::RefPtr<skia::LazyPixelRef> pixel_ref_;
+ skia::RefPtr<SkPixelRef> pixel_ref_;
int layer_id_;
RenderingStatsInstrumentation* rendering_stats_;
const RasterWorkerPool::Task::Reply reply_;
@@ -451,7 +453,7 @@ RasterWorkerPool::RasterTask RasterWorkerPool::CreateRasterTask(
// static
RasterWorkerPool::Task RasterWorkerPool::CreateImageDecodeTask(
- skia::LazyPixelRef* pixel_ref,
+ SkPixelRef* pixel_ref,
int layer_id,
RenderingStatsInstrumentation* stats_instrumentation,
const Task::Reply& reply) {
« no previous file with comments | « cc/resources/raster_worker_pool.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698