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

Unified Diff: dm/DMGpuTask.cpp

Issue 26468005: Fix DM build failures. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: declare tool_main Created 7 years, 2 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 | « dm/DMCpuTask.cpp ('k') | dm/DMReplayTask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMGpuTask.cpp
diff --git a/dm/DMGpuTask.cpp b/dm/DMGpuTask.cpp
index 9205cb996bfa736a218eb8976803b5faee15da2b..6cf69ffc1c9c2b8a550ae39ad8260b99606f92e8 100644
--- a/dm/DMGpuTask.cpp
+++ b/dm/DMGpuTask.cpp
@@ -30,7 +30,7 @@ static void* new_gr_context_factory() {
}
static void delete_gr_context_factory(void* factory) {
- return SkDELETE((GrContextFactory*) factory);
+ SkDELETE((GrContextFactory*) factory);
}
static GrContextFactory* get_gr_factory() {
@@ -40,7 +40,11 @@ static GrContextFactory* get_gr_factory() {
void GpuTask::draw() {
GrContext* gr = get_gr_factory()->get(fContextType); // Will be owned by device.
- SkGpuDevice device(gr, fConfig, fGM->width(), fGM->height(), fSampleCount);
+ SkGpuDevice device(gr,
+ fConfig,
+ SkScalarCeilToInt(fGM->width()),
+ SkScalarCeilToInt(fGM->height()),
+ fSampleCount);
SkCanvas canvas(&device);
canvas.concat(fGM->getInitialTransform());
@@ -48,7 +52,7 @@ void GpuTask::draw() {
canvas.flush();
SkBitmap bitmap;
- bitmap.setConfig(fConfig, fGM->width(), fGM->height());
+ bitmap.setConfig(fConfig, SkScalarCeilToInt(fGM->width()), SkScalarCeilToInt(fGM->height()));
canvas.readPixels(&bitmap, 0, 0);
// We offload checksum comparison to the main CPU threadpool.
@@ -57,7 +61,7 @@ void GpuTask::draw() {
}
bool GpuTask::shouldSkip() const {
- return fGM->getFlags() & skiagm::GM::kSkipGPU_Flag;
+ return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag);
}
} // namespace DM
« no previous file with comments | « dm/DMCpuTask.cpp ('k') | dm/DMReplayTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698