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

Unified Diff: content/browser/compositor/software_output_device_ozone_unittest.cc

Issue 217003002: [Ozone] Update Skia types in SoftwareOutputDeviceOzone to match upstream changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/software_output_device_ozone_unittest.cc
diff --git a/content/browser/compositor/software_output_device_ozone_unittest.cc b/content/browser/compositor/software_output_device_ozone_unittest.cc
index fc638b92527cdb1eb1b002a8bfe715ec6d774401..ed94e9f9ed0a33cc720b6b4f2bfd4e5a2c9e1e7b 100644
--- a/content/browser/compositor/software_output_device_ozone_unittest.cc
+++ b/content/browser/compositor/software_output_device_ozone_unittest.cc
@@ -7,7 +7,7 @@
#include "cc/output/software_frame_data.h"
#include "content/browser/compositor/software_output_device_ozone.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/skia/include/core/SkBitmapDevice.h"
+#include "third_party/skia/include/core/SkSurface.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/gfx/ozone/surface_factory_ozone.h"
@@ -38,23 +38,19 @@ class MockSurfaceFactoryOzone : public gfx::SurfaceFactoryOzone {
}
virtual bool AttemptToResizeAcceleratedWidget(
gfx::AcceleratedWidget w, const gfx::Rect& bounds) OVERRIDE {
- device_ = skia::AdoptRef(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
- bounds.width(),
- bounds.height(),
- true));
- canvas_ = skia::AdoptRef(new SkCanvas(device_.get()));
+ surface_ = skia::AdoptRef(SkSurface::NewRaster(
+ SkImageInfo::MakeN32Premul(bounds.width(), bounds.height())));
return true;
}
virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w) OVERRIDE {
- return canvas_.get();
+ return surface_->getCanvas();
}
virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider(
gfx::AcceleratedWidget w) OVERRIDE {
return scoped_ptr<gfx::VSyncProvider>();
}
private:
- skia::RefPtr<SkBitmapDevice> device_;
- skia::RefPtr<SkCanvas> canvas_;
+ skia::RefPtr<SkSurface> surface_;
DISALLOW_COPY_AND_ASSIGN(MockSurfaceFactoryOzone);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698