Commit 233c886d authored by fmalita's avatar fmalita Committed by Commit bot

Remove skia::SupportsPlatformPaint()

It is equivalent to checking the result of GetNativeDrawingContext(), so
do that instead, in NativeThemeWin::Paint().

Also remove an unused param of NativeThemeWin::PaintIndirect().

BUG=675977
R=reed@google.com

Review-Url: https://codereview.chromium.org/2610003002
Cr-Commit-Position: refs/heads/master@{#441388}
parent 04b297ee
......@@ -58,10 +58,6 @@ bool GetWritablePixels(SkCanvas* canvas, SkPixmap* result) {
return true;
}
bool SupportsPlatformPaint(const SkCanvas* canvas) {
return GetPlatformDevice(canvas->getTopDevice(true)) != nullptr;
}
size_t PlatformCanvasStrideForWidth(unsigned width) {
return 4 * width;
}
......
......@@ -121,11 +121,6 @@ SK_API SkBitmap ReadPixels(SkCanvas* canvas);
// the pixmap to empty.
SK_API bool GetWritablePixels(SkCanvas* canvas, SkPixmap* pixmap);
// Returns true if native platform routines can be used to draw on the
// given canvas. If this function returns false,
// GetNativeDrawingContext() should return NULL.
SK_API bool SupportsPlatformPaint(const SkCanvas* canvas);
// Returns the NativeDrawingContext to use for native platform drawing calls.
SK_API NativeDrawingContext GetNativeDrawingContext(SkCanvas* canvas);
......
......@@ -285,10 +285,10 @@ void NativeThemeWin::Paint(SkCanvas* canvas,
// UI features like scrollbars. However, we need to set up that buffer,
// and then read it back when it's done and blit it onto the screen.
if (skia::SupportsPlatformPaint(canvas))
if (surface)
PaintDirect(canvas, surface, part, state, rect, extra);
else
PaintIndirect(canvas, surface, part, state, rect, extra);
PaintIndirect(canvas, part, state, rect, extra);
}
NativeThemeWin::NativeThemeWin()
......@@ -673,7 +673,6 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
}
void NativeThemeWin::PaintIndirect(SkCanvas* destination_canvas,
HDC destination_hdc,
Part part,
State state,
const gfx::Rect& rect,
......
......@@ -144,7 +144,6 @@ class NATIVE_THEME_EXPORT NativeThemeWin : public NativeTheme,
// temporary HDC, and then blit the result to canvas. This is to work around
// the fact that Windows XP and some classic themes give bogus alpha values.
void PaintIndirect(SkCanvas* destination_canvas,
HDC destination_hdc,
Part part,
State state,
const gfx::Rect& rect,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment