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

Side by Side Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 2575533002: SkClipOp is an enum class now (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/tabs/tab.h" 5 #include "chrome/browser/ui/views/tabs/tab.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 } 1269 }
1270 if (g_image_cache->size() > kMaxImageCacheSize) 1270 if (g_image_cache->size() > kMaxImageCacheSize)
1271 g_image_cache->pop_back(); 1271 g_image_cache->pop_back();
1272 it = g_image_cache->begin(); 1272 it = g_image_cache->begin();
1273 } 1273 }
1274 1274
1275 gfx::ScopedCanvas scoped_canvas( 1275 gfx::ScopedCanvas scoped_canvas(
1276 use_fill_and_stroke_images ? canvas : nullptr); 1276 use_fill_and_stroke_images ? canvas : nullptr);
1277 if (use_fill_and_stroke_images) { 1277 if (use_fill_and_stroke_images) {
1278 canvas->DrawImageInt(it->fill_image, 0, 0); 1278 canvas->DrawImageInt(it->fill_image, 0, 0);
1279 canvas->sk_canvas()->clipPath(clip, kDifference_SkClipOp, true); 1279 canvas->sk_canvas()->clipPath(clip, SkClipOp::kDifference, true);
1280 } 1280 }
1281 canvas->DrawImageInt(it->stroke_image, 0, 0); 1281 canvas->DrawImageInt(it->stroke_image, 0, 0);
1282 } 1282 }
1283 1283
1284 void Tab::PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas, 1284 void Tab::PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas,
1285 gfx::Canvas* stroke_canvas, 1285 gfx::Canvas* stroke_canvas,
1286 bool is_active, 1286 bool is_active,
1287 int fill_id, 1287 int fill_id,
1288 int y_offset) { 1288 int y_offset) {
1289 gfx::Path fill; 1289 gfx::Path fill;
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 SchedulePaintInRect(bounds); 1584 SchedulePaintInRect(bounds);
1585 } 1585 }
1586 1586
1587 gfx::Rect Tab::GetImmersiveBarRect() const { 1587 gfx::Rect Tab::GetImmersiveBarRect() const {
1588 // The main bar is as wide as the normal tab's horizontal top line. 1588 // The main bar is as wide as the normal tab's horizontal top line.
1589 gfx::Rect contents = GetContentsBounds(); 1589 gfx::Rect contents = GetContentsBounds();
1590 contents.set_y(0); 1590 contents.set_y(0);
1591 contents.set_height(kImmersiveBarHeight); 1591 contents.set_height(kImmersiveBarHeight);
1592 return contents; 1592 return contents;
1593 } 1593 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/windows_10_caption_button.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698