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

Side by Side Diff: Source/core/platform/graphics/skia/OpaqueRegionSkia.cpp

Issue 44253003: Remove virtual destructors for several graphics classes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/core/platform/graphics/skia/OpaqueRegionSkia.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, Google Inc. All rights reserved. 2 * Copyright (c) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 27 matching lines...) Expand all
38 #include "SkColorFilter.h" 38 #include "SkColorFilter.h"
39 #include "SkShader.h" 39 #include "SkShader.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 OpaqueRegionSkia::OpaqueRegionSkia() 43 OpaqueRegionSkia::OpaqueRegionSkia()
44 : m_opaqueRect(SkRect::MakeEmpty()) 44 : m_opaqueRect(SkRect::MakeEmpty())
45 { 45 {
46 } 46 }
47 47
48 OpaqueRegionSkia::~OpaqueRegionSkia()
49 {
50 }
51
52 IntRect OpaqueRegionSkia::asRect() const 48 IntRect OpaqueRegionSkia::asRect() const
53 { 49 {
54 // Returns the largest enclosed rect. 50 // Returns the largest enclosed rect.
55 int left = SkScalarCeil(m_opaqueRect.fLeft); 51 int left = SkScalarCeil(m_opaqueRect.fLeft);
56 int top = SkScalarCeil(m_opaqueRect.fTop); 52 int top = SkScalarCeil(m_opaqueRect.fTop);
57 int right = SkScalarFloor(m_opaqueRect.fRight); 53 int right = SkScalarFloor(m_opaqueRect.fRight);
58 int bottom = SkScalarFloor(m_opaqueRect.fBottom); 54 int bottom = SkScalarFloor(m_opaqueRect.fBottom);
59 return IntRect(left, top, right-left, bottom-top); 55 return IntRect(left, top, right-left, bottom-top);
60 } 56 }
61 57
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 opaqueRect.setEmpty(); 424 opaqueRect.setEmpty();
429 } 425 }
430 426
431 SkRect& OpaqueRegionSkia::currentTrackingOpaqueRect() 427 SkRect& OpaqueRegionSkia::currentTrackingOpaqueRect()
432 { 428 {
433 // If we are drawing into a canvas layer, then track the opaque rect in that layer. 429 // If we are drawing into a canvas layer, then track the opaque rect in that layer.
434 return m_canvasLayerStack.isEmpty() ? m_opaqueRect : m_canvasLayerStack.last ().opaqueRect; 430 return m_canvasLayerStack.isEmpty() ? m_opaqueRect : m_canvasLayerStack.last ().opaqueRect;
435 } 431 }
436 432
437 } // namespace WebCore 433 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/skia/OpaqueRegionSkia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698