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

Unified Diff: cc/resources/raster_worker_pool.h

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deprecate GLenum format throughout cc Created 7 years, 3 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/raster_worker_pool.h
diff --git a/cc/resources/raster_worker_pool.h b/cc/resources/raster_worker_pool.h
index a53e52ff4b2acc507c184cf640339448b6a812bc..39b8ba3d01343a7cc181f6f024a97a7365c60eb4 100644
--- a/cc/resources/raster_worker_pool.h
+++ b/cc/resources/raster_worker_pool.h
@@ -11,11 +11,10 @@
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/resources/picture_pile_impl.h"
#include "cc/resources/raster_mode.h"
+#include "cc/resources/resource_provider.h"
#include "cc/resources/tile_priority.h"
#include "cc/resources/worker_pool.h"
#include "third_party/khronos/GLES2/gl2.h"
-// TODO(robertphillips): change this to "class SkBaseDevice;"
-#include "third_party/skia/include/core/SkDevice.h"
namespace skia {
class LazyPixelRef;
@@ -34,11 +33,13 @@ class CC_EXPORT RasterWorkerPoolTask
public:
typedef std::vector<scoped_refptr<WorkerPoolTask> > TaskVector;
- // Returns true if |device| was written to. False indicate that
- // the content of |device| is undefined and the resource doesn't
+ // Returns true if |buffer| was written to. False indicate that
+ // the content of |buffer| is undefined and the resource doesn't
// need to be initialized.
- virtual bool RunOnWorkerThread(SkBaseDevice* device,
- unsigned thread_index) = 0;
+ virtual bool RunOnWorkerThread(unsigned thread_index,
+ void* buffer,
+ gfx::Size size,
+ int stride) = 0;
virtual void CompleteOnOriginThread() = 0;
void DidRun(bool was_canceled);
@@ -186,7 +187,7 @@ class CC_EXPORT RasterWorkerPool : public WorkerPool {
virtual void ScheduleTasks(RasterTask::Queue* queue) = 0;
// Returns the format that needs to be used for raster task resources.
- virtual GLenum GetResourceFormat() const = 0;
+ virtual ResourceProvider::TextureFormat GetResourceFormat() const = 0;
// TODO(vmpstr): Figure out an elegant way to not pass this many parameters.
static RasterTask CreateRasterTask(
@@ -202,7 +203,8 @@ class CC_EXPORT RasterWorkerPool : public WorkerPool {
int source_frame_number,
RenderingStatsInstrumentation* rendering_stats,
const RasterTask::Reply& reply,
- Task::Set* dependencies);
+ Task::Set* dependencies,
+ ResourceProvider::TextureFormat texture_format);
static Task CreateImageDecodeTask(
skia::LazyPixelRef* pixel_ref,

Powered by Google App Engine
This is Rietveld 408576698